dlmwrite problem within loop

13 次查看(过去 30 天)
Rana Sobhy
Rana Sobhy 2017-12-19
评论: Rana Sobhy 2017-12-19
i want to write matrix that result from loop in a txt file comma delimited i write the following command:
dlmwrite(['Test_data_Proposed', num2str(flag),'.txt'] , all_measured,'delimiter',',');
as flag is the counter within loop, all_measured is the matrix the error that all txt files have the same length although they don't. dlmwrite fixes the txt file length to 795 while all_measured values could exceed 1000 or less. How Could i fix this issue?
  6 个评论
Walter Roberson
Walter Roberson 2017-12-19
dlmwrite() is intended to overwrite the existing content unless you use the -append flag .
Rana Sobhy
Rana Sobhy 2017-12-19
i don't use append option . Even if i use it , in each loop i write in diffrent file .
i couldn't upload the file as it calls more than 3 function related o images

请先登录,再进行评论。

回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by