Path: news.mathworks.com!not-for-mail
From: "manesh g" <manesh_g2001@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: peak position
Date: Fri, 16 Jan 2009 05:44:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <gkp6r2$e92$1@fred.mathworks.com>
References: <gkp4i0$2au$1@fred.mathworks.com> <gkp5aa$ig7$1@fred.mathworks.com>
Reply-To: "manesh g" <manesh_g2001@yahoo.com>
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 1232084642 14626 172.30.248.37 (16 Jan 2009 05:44:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 Jan 2009 05:44:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1403741
Xref: news.mathworks.com comp.soft-sys.matlab:511943


Dear Matt Fig,
thanks for the clue. I can use the data itself, but I want the x-value, and I do not understand ur script, "chi" for example. When I tried ur script it does not work out. I am a beginner to Matlab, can you explain me the steps?
thanks,
manesh


"Matt Fig" <spamanon@yahoo.com> wrote in message <gkp5aa$ig7$1@fred.mathworks.com>...
> 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