Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Excel Add-in for DB2 1.7
wolfSSL 4.0.0
EntityDAC Express 2.2
SecureBridge 9.1
C# HTML to PDF 2019.6.5
PHP Ecommerce Script 3.6
Devart SSIS Data Flow Components 1.11
dbForge Data Compare for PostgreSQL 3.2.15
OrgChart JS 4.9.7
iScripts CyberMatch 1.3.3
AnyGantt JS Gantt Charts 8.7.0
Database Workbench Pro 5.6.8
SentiMask SDK Trial 2.0.193121
dbForge Studio for SQL Server 5.8
ODBC Driver for ASE 2.1.2
Top Code
VisualNEO Web 2018.12.15
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
Report About Peaks picking 1.0
- required fields

Please enter text on the image
  



PICKPEAKS is similar to MATLAB's FINDPEAKS; it returns local peaks and their indices for the input X. The main differences are that PICKPEAKS
- is faster (much faster for large vectors),
- allows X to be a 2D matrix (not just a vector) and the user can specify across which dimension to look for peaks.
- picks either peaks or troughs.
- does not provide the FINDPEAKS option d-de?THRESHOLDd-deOao.
- does not provide the FINDPEAKSd-deOao options: d-de?MINPEAKHEIGHTd-deOao, d-de?NPEAKSd-deOao, d-de?SORTSTRd-deOao. Those can be achieved easily by manipulating the output. E.g. if Vo, Io are the output of PICKPEAKS, the following will yield the same result as setting d-de?MINPEAKHEIGHTd-deOao to 0.5:
i = find(Vo<0.5);
Vo(i) = [];
Io(i) = [];

The syntax is
[Vo,Io] = PICKPEAKS(X,npts,dim,mode);

Examples of usage are:
[Vo,Io] = PICKPEAKS(X);
[Vo,Io] = PICKPEAKS(X,[],[],d-deOaotroughsd-deOao);
[Vo,Io] = PICKPEAKS(X,10,[],d-deOaotroughsd-deOao); % require at least 10 samples distance between troughs.
[Vo,Io] = PICKPEAKS(X,[],2); % search for peaks across rows

The screenshot was generated by
x = randn(200,1);
tic, [val,ind] = pickpeaks(x,10); toc
tic, [pks,loc] = findpeaks(x,'minpeakdistance',10); toc
figure, plot(x), hold all, plot(ind,val,'ro', loc,pks,'k+', 'MarkerSize',10), legend('x','pickpeaks','findpeaks')

Notice another difference between FINDPEAKS and PICKPEAKS: FINDPEAKS does not qualify some peaks (e.g. 3 peaks around sample 50) because there are other peaks in their vicinity, which did not qualify either. PICKPEAKS will pick those as well.

Back