I have Matlab code such as:
f=figure(1)
plot(x,y)
hold on
plot(x1,y1)
hold on
...
plot(xf, yf)
%want to save this into a VARIABLE, NOT into a .fig, .png, jpg, or other kind of file
So if it is possible to save this into some variable var_fig
, I would like to later open the figure (such as in a subplot with multiple saved figures/plots) doing something like
showfig(var_fig)
Is this possible in Matlab?