Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
Jonathan O'Neill
Jonathan O'Neill am 19 Nov. 2014
Kommentiert: Jonathan O'Neill am 20 Nov. 2014
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 Kommentar
Jonathan O'Neill
Jonathan O'Neill am 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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Graphics Object Properties finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by