help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading mat file


From: asha g
Subject: Re: Reading mat file
Date: Wed, 21 Mar 2012 18:15:28 +0800 (SGT)

Attaching a plot. Look at the peak values of all the red peaks.
Asha 
 
 
 
 
Goals too clearly defined can become blinkers.
Mary Catherine Bateson


From: Andrew Howe <address@hidden>
To: asha g <address@hidden>
Sent: Wednesday, 21 March 2012 3:30 PM
Subject: Re: Reading mat file

How do you define "peak"?  Are they all the same value, or different?

Andrew

<~~~~~~~~~~~~~~~~~~~~~~~~~~~>
J. Andrew Howe, PhD
Associate Editor, European Journal of Pure and Applied Mathematics
Production Editor, Journal of Algebraic Statistics
www.andrewhowe.com
I live to learn, so I can learn to live. - me
<~~~~~~~~~~~~~~~~~~~~~~~~~~~>


On Wed, Mar 21, 2012 at 11:59 AM, asha g <address@hidden> wrote:
Andrew,
this is great.Now I want all the peak values - I have about 3- 4 maxima for x= 55 .
How do I get this program to give me all the peak values and the corresponding x values. Here  it is selecting one value of the entire lot. 

Thanks
Asha
 
 
 
 


From: ahowe42 <address@hidden>
To: address@hidden
Sent: Wednesday, 21 March 2012 12:58 PM
Subject: Re: Reading mat file

Assuming I've understood, this is actually very easy to do:

[val,idx] = max(vv1);
max_x = x(idx);

if you run "help max", you'll see that it can pass two outputs: the first is
the actual maximum, and the second is the "first index of the maximum
value".  The min function can do the same thing.

Oh, and to display the contents of a variable in MATLAB/octave, you don't
*have to* use disp.  Just type the variable name at the prompt and hit
enter; this tells the program to print the contents to the screen.

Andrew

--
View this message in context: http://octave.1599824.n4.nabble.com/Re-Reading-mat-file-tp4487833p4491496.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave





Attachment: cabunbact1aN11oct.eps
Description: PostScript document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]