Info
この質問は閉じられています。 編集または回答するには再度開いてください。
How to expand matrice with zeroes?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a xls file with 3 columns and 212 rows of data. Is there any way to insert 3 columns of zeroes with x number of rows in the middle, so there is a total of 365 rows?
0 件のコメント
回答 (1 件)
Image Analyst
2012 年 11 月 22 日
Read it in with xlsread(). Insert the columns and rows. Then write back out with xlswrite().
2 件のコメント
Image Analyst
2012 年 11 月 22 日
No. All you attempted was writing the stuff back out. Where is your call to xlsread, and your insertion code??????
[numbers txt raw] = xlsread('testdata.xls');
insertionRow = 10;
output = [numbers(1:insertionRow, :); newXRows; numbers((insertionRow+1):end,:)];
xlswrite(output, 'testdata.xls', 'D1'); % Write into columns 4-6.
or something like that.
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!