Trying to output data to excel
11 views (last 30 days)
Show older comments
Hey,
I have my code below and I'm just trying to output the data into an excel file. I tried doing the xlswrite command but it doesn't work. A friend of mine told me because my headers are a cell and my data is in a cell array. I have no idea what that means and don't know how to resolve it.
Thank You in advance for helping me
%% read data file a = xlsread('book5', 'A:H')
%% create unique points from data set 1 ext1=a(:,2); load1=a(:,4);
[ext1_u,I_unique1]=unique(ext1); load1_u = load1(I_unique1);
%% create unique points from data set 2 ext2=a(:,6); load2=a(:,8); I=(~isnan(load2)); ext2=ext2(I); load2=load2(I); [ext2_u, I_unique2] = unique(ext2); load2_u = load2(I_unique2);
%% plots plot(load1,ext1,load2,ext2)
%% Pull Unique data points for ext1 ext1_i=interp1(load1_u,ext1_u,load2_u)
%% plot again % figure subplot 211 plot(load1,ext1, load2,ext2, load2_u,ext1_i) xlabel('Load (lb)') ylabel('Extension (in)')
subplot 212 plot(load2_u,ext1_i-ext2_u) xlabel('Load (lb)') ylabel('Extension (in)')
0 Comments
Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!