Trying to output data to excel

조회 수: 11 (최근 30일)
Cgpat
Cgpat 2012년 5월 24일
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개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by