How to call specific variables from multiple M-Files to draw graph?

1 view (last 30 days)
My current code takes 101 images from a camera and calculates data for each image, it saves the m-file each time leaving me with 101 m-files named SigLevel0 to SigLevel101. I would like to draw a graph using only the data named "SigLevel" saved within each of these m-files that I have awkwardly also named "SigLevel".
When I open one of the generated files... ie SigLevel 13 this is what I see:
[ BrightLevel, DarkLevel, SigLevel, RMS_Noise, Noise ] = CalcImageData( 0, 1, 1392, 1040, 174, expovalue )
Signallevel = [ 'SigLevel' num2str(noofscans) '.mat' ];
save(Signallevel);
pause(0.01)
end
this is the code that runs the test, then saves the result. How can I then read the siglevel from siglevel0 to siglevel100 and plot it?
thanks
  1 Comment
Jonathan O'Neill
Jonathan O'Neill on 20 Nov 2014
I think I have found out how to do this from a guide I came across that Doug put up...
For example, if A1 through A10 contain scalars, use:
A = zeros(1,10); % Not necessary, just much faster
for i=1:10
A(i) = % some equation
end

Sign in to comment.

Answers (0)

Categories

Find more on Graphics Object Properties 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!