How to plot and save the content of a 5D array?
Ältere Kommentare anzeigen
Hello,
I have a 5 dimension array M_ii (attached). It's size is 25x50x3x14x2. I want to plot and save the following on the same figure
M_ii(bb,:,1,1,1)
M_ii(bb,:,2,1,1)
M_ii(bb,:,3,1,1)
And do the same thing for the rest M_ii(:,:,:,pp,ii).
for ii = 1:length(tol)
for pp = 1:length(p)
for bb = 1:length(bgt)
for kk = 1:length(trigger)
plot(1:length(M_ii(bb,:,kk,pp,ii)),M_ii(bb,:,kk,pp,ii))
end
savefig(sprintf('traj.mat'),..)
end
end
end
I want to save all the resulting figures as .fig files but without displaying them when I run the code above. For the names of the figures, I want something like this: traj151. Where the first one represents bb=1 and number 5 represents pp=5 and the seconed one represents ii=1
Your help and ideas would be appreciated.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!