Exporting data from for loop into text file
Show older comments
Currently I have a for loop running and I'm trying to export the data from the for loop into a text file. I tried the following but it gives me all the data in a row:
x = (1:size(BOLD,1))./1.16E6;
y = BOLD;
xy = [x(:), y(:)];
dlmwrite('YourOutputFile.txt', xy, 'delimiter', ',');
(BOLD is the variable that I plotted which I need the numerical data for)
Is there a way to export the data in a way so that it gives me all the data sets in separate files (one file per graph produced)?
Thank you in advance!
Accepted Answer
More Answers (0)
Categories
Find more on Text Files 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!