Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
References: <i9mkro$oib$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1287684664 27687 172.30.248.37 (21 Oct 2010 18:11:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 21 Oct 2010 18:11:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2548544
Xref: news.mathworks.com comp.soft-sys.matlab:680278

"Konst " <konstance1@hotmail.com> wrote in message <i9mkro$oib$1@fred.mathworks.com>...
> 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

anyone??