⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pkpickerneg.m

📁 Algorithm that find the peaks of a signal. You can choose the number of peaks you want to find and t
💻 M
字号:
function  [peaks, locs] = pkpicker( x, thresh, number, sortem )
%PKPICKER      pick out the peaks in a vector
%--------
%   Usage:  [peaks,locs] = pkpicker( x, thresh, number, sortem )
%
%      peaks   :  valori di picco
%      locs    :  indici dei picchi (indice all'interno di una colonna)
%      x       :  input data  (se complesso , opera su imag)
%      thresh  :  respinge picchi sotto questo livello
%      number  :  numero massimi di picchi da restituire
%      sortem  :  'sort' restituisce una lista ordinata per ampiezza dei picchi 
%                 invece che per indice (di default)
%                 

% serie di condizioni sul numero di argomenti nel richiamo della funzione
if nargin == 1
   thresh = -inf;   number = -1;   sortem = 0;
elseif nargin == 2
   number = -1;   sortem = 0;
elseif nargin == 3
   sortem = 0;
end
if strcmp(sortem,'sort')
   sortem = 1;
end

[M,N] = size(x); %controllo delle dimensioni del segnale 
if M==1
   x = x(:);     %-- trasforma x in una unica colonna
   [M,N] = size(x);
end
if any(imag(x(:))~=0) %any lavora sulle colonne di una matrice ,e restituisce 
                      % 1 se almeno un elemento di tale colonna 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -