From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: re-open a figure to continue processing
Date: Thu, 21 Oct 2010 18:11:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <i9pvno$r17$>
References: <i9mkro$oib$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1287684664 27687 (21 Oct 2010 18:11:04 GMT)
NNTP-Posting-Date: Thu, 21 Oct 2010 18:11:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2548544
Xref: comp.soft-sys.matlab:680278

"Konst " <> wrote in message <i9mkro$oib$>...
> I have a square wave and I use ginput to select each time 2 points in a for-loop which breaks when I select points that aren't on the curve.When I finish, I save it as a .fig file.How can I reopen the last figure to process it again(let's say I want to add a few more points using ginput) without having to run the whole algorithm from the beginning?
> i=1;
> while i>=1;
>     [x,y] = ginput(2);
> get(gco,'Type');
> TF=strcmp(get(gco,'Type'),'line');
> if TF==0
>     saveas (gcf,'lastgraph.fig');
>     break;    
> end
> d(i)=x(2)-x(1)
> i=i+1
> end