XLSwrite to write in a different column in each iteration
6 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
I am Sorting the first column of a Dataset Array by using sortrows() and writing the sorted column(values) as it is to excel sheet via XLS write by using the following:
for k=1:40,
sorted=sortrows(rr2,k);
xlswrite('rr2.xls', sorted.Assets , 'XLsheet',['A' num2str(k)]);
end
but the above code changes the row number with counter....I want to write the sorted values to the next excel column in each iteration,,,for example columns from A to AN.
How can I do this?
Regards,
AMD.
2 件のコメント
採用された回答
その他の回答 (1 件)
Andrei Bobrov
2012 年 4 月 5 日
EDITED on Ahmad comment
[~,isrd] = sort(double(rr2(:,2:end)));
N = cellstr(rr2(:,1));
xlswrite('rr2.xlsx',N(isrd));
参考
カテゴリ
Help Center および File Exchange で Shifting and Sorting Matrices についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!