problem with saving data as .mat file

1 view (last 30 days)
Hi !
i have an output of a for loop. i want to save this output as .mat file.
how could i do this ?
I tried with save and fprintf but no results...
thank you for help

Accepted Answer

Walter Roberson
Walter Roberson on 7 Dec 2012
for K = 1 : 20
filename = sprintf('File_%03d.mat', K);
save(filename, 'K');
end
  1 Comment
Rica
Rica on 7 Dec 2012
i used this dlmwrite('filename.txt',VAR). and with load i could load the data. thank you for the answer

Sign in to comment.

More Answers (0)

Categories

Find more on Variables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!