Write a file starting in column 7.
1 回表示 (過去 30 日間)
古いコメントを表示
Leonardo Barbosa Torres dos Santos
2019 年 4 月 5 日
回答済み: Leonardo Barbosa Torres dos Santos
2019 年 4 月 6 日
Dear, I have a question about write the data in the file.
Is possible write a data in the file starting in column 7 ?
For example:
My program is writing:
Line 1 and Column 1 until 36
Line 2 and Column 1 until 36
.
.
Line 19 and colund 1 until 36.
I would like write starting in column 7 until 42.
that is:
line 1 and Column 7 until 42
line 2 and Column 7 until 42
.
.
line 19 and Column 7 until 42.
That is, all line of column 1 until column 6 stay empty.
Is it possible ?
thank you
1 件のコメント
dpb
2019 年 4 月 5 日
Certainly possible but specifics depend on what kind of file you're trying to create???
採用された回答
A. Sawas
2019 年 4 月 5 日
If your data is in csv format, you can use the command csvwrite with row and col parameters as follows:
row = 0;
col = 6; % row and cols are zero-based so row=0 and col=0 are the first row and column, respectively.
csvwrite(filename, yourdata, row, col);
2 件のコメント
A. Sawas
2019 年 4 月 5 日
Try appending zeros to C in the columns from 1 to 6, like this:
C = [zeros(19,6) C];
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!