plot multiple eval output
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I was wondering how i could imagesc multiple slices into individual figures or subplots
for n=1:nframes
eval(['Fr' num2str(n) ' = slices(:,:,n)'])
%slices is a multislice 2d image
end
this will give if nframes 15 Fr1 to Fr15
should i do something like (this is well wrong)
or
n=1:nframes
figure
eval(['Fr' num2str(n) ' = slices(:,:,n)'])
%slices is a multislice 2d image
imagesc(Fr(n)) % can i do this how?
end
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Matt Fig
am 15 Mär. 2011
Use cell arrays instead, as the FAQ shows.
for n=1:nframes
figure
Fr{n} = slices(:,:,n);
imagesc(Fr{n})
end
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements 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!