Dlmwrite function problem to be fixed
1 回表示 (過去 30 日間)
古いコメントを表示
Hello guys i have a matrix of C(6,5) , what i want is to just take first and the fifth column and insert it into a text file , and i want it to be something like:
0 0
1 1
3 8
4 7
8 1
do you know which steps i have to follow? Thank you!
0 件のコメント
採用された回答
dpb
2015 年 2 月 26 日
doc colon
dlmwrite('newfile',[C(:,1) C(:,5)]);
2 件のコメント
dpb
2015 年 2 月 26 日
doc dlmwrite
Look at the optional 'precision' output that lets you specify either significant digits wanted or a specific format string.
NB: however, if the file is this large, what are you doing writing it as text file anyway? Can't possible expect to look at it by hand so why not use a stream file or if keeping it in Matlab, .mat?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!