1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>findpeaks</title>
<style type="text/css" media="all">
@import url("scilab_code.css");
@import url("xml_code.css");
@import url("c_code.css");
@import url("style.css");
</style>
</head>
<body>
<div class="manualnavbar">
<table width="100%"><tr>
<td width="30%">
<span class="previous"><a href="filtord.html"><< filtord</a></span>
</td>
<td width="40%" class="center">
<span class="top"><a href="section_cc2bc01c47967d47fcf3507a91d572ba.html">FOSSEE Signal Processing Toolbox</a></span>
</td>
<td width="30%" class="next">
<span class="next"><a href="fir1.html">fir1 >></a></span>
</td>
</tr></table>
<hr />
</div>
<span class="path"><a href="index.html">FOSSEE Signal Processing Toolbox</a> >> <a href="section_cc2bc01c47967d47fcf3507a91d572ba.html">FOSSEE Signal Processing Toolbox</a> > findpeaks</span>
<br /><br />
<div class="refnamediv"><h1 class="refname">findpeaks</h1>
<p class="refpurpose">This function find peaks on DATA.</p></div>
<div class="refsynopsisdiv"><h3 class="title">Calling Sequence</h3>
<div class="synopsis"><pre><span class="default">[</span><span class="default">PKS</span><span class="default">, </span><span class="default">LOC</span><span class="default">, </span><span class="default">EXTRA</span><span class="default">] = </span><span class="functionid">findpeaks</span><span class="default">(</span><span class="default">DATA</span><span class="default">)</span>
<span class="default">[</span><span class="default">PKS</span><span class="default">, </span><span class="default">LOC</span><span class="default">, </span><span class="default">EXTRA</span><span class="default">] = </span><span class="functionid">findpeaks</span><span class="default">(..., </span><span class="default">PROPERTY</span><span class="default">, </span><span class="default">VALUE</span><span class="default">)</span>
<span class="default">[</span><span class="default">PKS</span><span class="default">, </span><span class="default">LOC</span><span class="default">, </span><span class="default">EXTRA</span><span class="default">] = </span><span class="functionid">findpeaks</span><span class="default">(..., </span>"<span class="default">DoubleSided</span>"<span class="default">)</span></pre></div></div>
<div class="refsection"><h3 class="title">Description</h3>
<p class="para">Peaks of a positive array of data are defined as local maxima. For double-sided data, they are maxima of the positive part and minima of the negative part. DATA is expected to be a single column vector.</p>
<p class="para">The function returns the value of DATA at the peaks in PKS. The index indicating their position is returned in LOC.</p>
<p class="para">The third output argument is a structure with additional information:</p>
<p class="para">"parabol":
A structure containing the parabola fitted to each returned peak. The structure has two fields, "x" and "pp". The field "pp" contains the coefficients of the 2nd degree polynomial and "x" the extrema of the intercal here it was fitted.</p>
<p class="para">"height":
The estimated height of the returned peaks (in units of DATA).</p>
<p class="para">"baseline":
The height at which the roots of the returned peaks were calculated (in units of DATA).</p>
<p class="para">"roots":
The abscissa values (in index units) at which the parabola fitted to each of the returned peaks crosses the "baseline" value. The width of the peak is calculated by 'diff(roots)'.</p>
<p class="para">This function accepts property-value pair given in the list below:</p>
<p class="para">"MinPeakHeight":
Minimum peak height (positive scalar). Only peaks that exceed this value will be returned. For data taking positive and negative values use the option "DoubleSided". Default value '2*std (abs (detrend (data,0)))'.</p>
<p class="para">"MinPeakDistance":
Minimum separation between (positive integer). Peaks separated by less than this distance are considered a single peak. This distance is also used to fit a second order polynomial to the peaks to estimate their width, therefore it acts as a smoothing parameter. Default value 4.</p>
<p class="para">"MinPeakWidth":
Minimum width of peaks (positive integer). The width of the peaks is estimated using a parabola fitted to the neighborhood of each peak. The neighborhood size is equal to the value of "MinPeakDistance". The width is evaluated at the half height of the peak with baseline at "MinPeakHeight". Default value 2.</p>
<p class="para">"DoubleSided":
Tells the function that data takes positive and negative values. The base-line for the peaks is taken as the mean value of the function. This is equivalent as passing the absolute value of the data after removing the mean.</p></div>
<br />
<div class="manualnavbar">
<table width="100%">
<tr><td colspan="3" class="next"><a href="http://bugzilla.scilab.org/enter_bug.cgi?product=Scilab%20software&component=Documentation%20pages" class="ulink">Report an issue</a></td></tr>
<tr>
<td width="30%">
<span class="previous"><a href="filtord.html"><< filtord</a></span>
</td>
<td width="40%" class="center">
<span class="top"><a href="section_cc2bc01c47967d47fcf3507a91d572ba.html">FOSSEE Signal Processing Toolbox</a></span>
</td>
<td width="30%" class="next">
<span class="next"><a href="fir1.html">fir1 >></a></span>
</td>
</tr></table>
<hr />
</div>
</body>
</html>
|