Saving data after each iteration

8 views (last 30 days)
Sydney Kehoe
Sydney Kehoe on 21 Jun 2021
Answered: Jonas on 21 Jun 2021
Hey so I have a code that takes the mean of the data set from the file that I load, and there are about 80 different files and I want to save all the means from each iteration of the for loop into one big matrix (so eventually I can make a box plot from all the means from all the data sets). Is there any way I can do this? Thanks.

Accepted Answer

Jonas
Jonas on 21 Jun 2021
something similar to
meanData=zeros(1,numel(fileList));
for fileNr=1:numel(fileList)
load(.....,myData);
meanData(fileNr)=mean(myData);
end

More Answers (0)

Categories

Find more on Multidimensional Arrays 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!