cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

peaks for various graphs?

UKMan
1-Newbie

peaks for various graphs?

Hi,

im having trouble with finding the peaks of a various data sets.

im attaching 3 data sets.. is there any way that the peaks can be found for them?

im thinking of smoothing the data first using supsmooth and then it will be easier. so im attaching the matcad 11 file and im also adding some explanation within it.

update:

searched google and came accross this. its one of the sample files

http://support.mathsoft.com/support/mcad8/Examples/Locate_peaks.mcd

but its not there anymore.. does anyone know where can I get it? or is it even what im looking for

Message was edited by: UKMan

ACCEPTED SOLUTION

Accepted Solutions
RichardJ
19-Tanzanite
(To:UKMan)

Here's another approach. I've posted these functions before I think, but I don't recall which thread (and can't be bothered to search for it!). These are newer versions though, so if anyone has the old ones they should replace them.

As a note, if you choose the window as 10 and the threshold as 5% it will find the two peaks in the unsmoothed data, in all three cases. For data set 1 it finds only the higher peak in the doublet. If you actually wanted to find both peaks in the doublet you could change the window size to 4.

View solution in original post

9 REPLIES 9
StuartBruff
23-Emerald III
(To:UKMan)

very primitive method that relies upon having reasonably smooth data. haven't got time to find a 'proper' method, so this is just a top of the head thing.

Stuart

StuartBruff
23-Emerald III
(To:StuartBruff)

Of course, if I had any brains then apart from using a proper technique, I would have embedded the smoothing function within the peak detector.

Stuart

MikeArmstrong
5-Regular Member
(To:StuartBruff)

Lovely work, great explanatory worksheet.

Mike

thanks a lot stuart_bruff

the explanation you did on that worksheet is epic

RichardJ
19-Tanzanite
(To:UKMan)

Here's another approach. I've posted these functions before I think, but I don't recall which thread (and can't be bothered to search for it!). These are newer versions though, so if anyone has the old ones they should replace them.

As a note, if you choose the window as 10 and the threshold as 5% it will find the two peaks in the unsmoothed data, in all three cases. For data set 1 it finds only the higher peak in the doublet. If you actually wanted to find both peaks in the doublet you could change the window size to 4.

MikeArmstrong
5-Regular Member
(To:RichardJ)

Very nice Richard.

There would be a neat method if the number of peaks is known. The data could be sorted and the corresponding peak values could then be extracted.

Simple but effective

Mike

UKMan
1-Newbie
(To:RichardJ)

thanks a lot

going through it now..

and yes i agree with you.. why re-invent the wheel

RichardJ
19-Tanzanite
(To:RichardJ)

Oops! Sorry about that folks. I had to modify the function to get it to handle the current data correctly (the old version did not like lots of zero values) and I didn't test it sufficiently on other data before posting it. There was a serious bug. Here's a new version that works for all the data I used to test it (which includes data other than that posted in this thread).

Stuart, and others praise for his excellent documentation, also embarrassed me into providing a little more explanation for how this function works

http://communities.ptc.com/servlet/JiveServlet/showImage/38-1286-10667/embarrassed.gif

A have calculated by Mathcad help a spesific vavue of water and steam by 2 formulations - IAPWS-95 and IAPWS-IF97

The different between this calculations you can see as a set os peaks: see surface and counter plot

Announcements

Top Tags