how to save loop data in one excel file?
1 回表示 (過去 30 日間)
古いコメントを表示
I was trying to save the following into one excel file, and do not how to do it. I only got three column data from the last sheet.
origindata=importdata(\rawdata.txt');
for t=(0.1:0.1:1)
f=origindata(:,1);
a=origindata(:,2);
b=origindata(:,3);
c=origindata(:,4);
d=origindata(:,5);
e=a-j*b;
u=c-j*d;
rl=f*0.01*t/3.*(u.*e)
plot(f,rl);
y1(:,1)=f;
y1(:,2)=rl;
y1(:,3)=t;
y1;
hold on;
end
xlswrite('\Desktop\sample',y1);
0 件のコメント
回答 (1 件)
madhan ravi
2020 年 7 月 7 日
編集済み: madhan ravi
2020 年 7 月 7 日
writetable(array2table(y1, 'VariableNames', {'f', 'rl', 't'}), '\Desktop\sample.xlsx')
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!