Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: peak position
Date: Fri, 16 Jan 2009 05:18:02 +0000 (UTC)
Organization: Battelle Energy Alliance (INL)
Lines: 14
Message-ID: <gkp5aa$ig7$1@fred.mathworks.com>
References: <gkp4i0$2au$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232083082 18951 172.30.248.37 (16 Jan 2009 05:18:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 Jan 2009 05:18:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688530
Xref: news.mathworks.com comp.soft-sys.matlab:511934


Are you saying that you don't have the data, you only have the plots?  You can get the data by looking in the 'xdata' and 'ydata' properties of the line objects (children of the axes).  Then you can use the max function to find the peaks.  For example:


x = 0:.1:10;
plot(x,x.^2,x,x.^2.1,x,x.^2.2)  % To catch up to where you are.
ch = get(gca,'chi')
get(ch(:),'ydata')

Now the y data is stored in a cell array.




`PBBFQ`PHBNPUIgB:ZIPnWDFMU&`BPV!OUQVMOFCLzB`CPJ`I``N.gDJF`B