필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Jonathan O'Neill
Jonathan O'Neill 2014년 11월 19일
댓글: Jonathan O'Neill 2014년 11월 20일
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
Jonathan O'Neill
Jonathan O'Neill 2014년 11월 20일
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

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by