Use of ".mat"-file and objects/matrices therein to create plots
1 view (last 30 days)
Show older comments
Hi all,
I want to do the following:
I have a file "xy_results.mat", which has inside of it among others an object called "oo_", and therein among others an object called "irfs". In "irfs" I have several vectors {y_a, c_a, i_a, y_b,c_b, i_b,...}. Now I would like to have a loop which creates subplots for all {y_a,y_b,...}, {c_a,c_b,...} etc and also subplots in another figure which contains all elements of {_a}, {_b}, etc.
Who can help me on this? Doing it manually I tried something like
load xy_results.mat
HOR=1:1:40;
plot(HOR,oo_.irfs.y_a,'y',HOR,oo_.irfs.c_a,'b')
which works fine, but as I have many entries in irfs and many differens ".mat" I'd prefer to have a loop that does the copy paste for me.
Could somebody please help me out on this issue, I would appreciate your help very much! Best, Philipp
0 Comments
Answers (1)
See Also
Categories
Find more on Interactive Control and Callbacks 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!