export .txt file
显示 更早的评论
Hello!
I need to export the answer for .txt file.
Columns must have spaces between them.
2 spaces before the first column.
3 spaces between 1 e 2 columns
3 spaces between 2 e 3 columns
6 spaces between 3 e 4 columns
6 spaces between 4 e 5 columns
1 space between 5 e 6 columns
2 spaces between 6 e 7 columns
2 spaces between 7 e 8 column
2 spaces between 9 e 10 column
2 spaces between 10 e 11 column
May someone help me?
A = importdata('teste.txt')
for M = 1:length(A);
if A (M,7) == 1;
A (M,1) = 0;
A (M,2) = 0;
A (M,3) = 0.78539;
elseif A (M,7) == 2;
A (M,1) = 0;
A (M,2) = 1.57089;
A (M,3) = 0.78539;
elseif A (M,7) == 3;
A (M,1) = 1.57089;
A (M,2) = 1.57089;
A (M,3) = 0.78539;
end
end
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Standard File Formats 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!