place Figure handles in vektor
Show older comments
Hello im making a funtion were its possible to typ in a fnction and make a plot of it,
function plot_handles=skapaplot(varargin)
syms x X;
global plot_handles;
persistent n;
if isempty(n)
n = 1;
else
n = n + 1;
end
funk=input('function:','s');
figure;
ezplot(funk);
plot_hanldes(n)=gcf;
end
I want to keep track of how many figure and other information about the line in the plot, in the vector plot_handles. how can i do it in a easy way?
6 Comments
Daniel Shub
on 22 May 2011
Other than a couple of typos and the fact that you are trying to return a global variable, what is your problem?
yngv
on 22 May 2011
Daniel Shub
on 22 May 2011
not on my computer.
yngv
on 22 May 2011
yngv
on 23 May 2011
Jan
on 23 May 2011
@yngv: I do not think this is annoying, but a suboptimal design.
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!