Looking for source code of a MATLAB function

3 ビュー (過去 30 日間)
Arkady Voloshin
Arkady Voloshin 2022 年 2 月 14 日
コメント済み: Arkady Voloshin 2022 年 2 月 15 日
I want to better understand the inner workings of the MATLAB findpeaks.m
Is it possbile to get a source for this function?

採用された回答

Walter Roberson
Walter Roberson 2022 年 2 月 14 日
Read the code ;-)
dbtype findpeaks 1:10
1 function [Ypk,Xpk,Wpk,Ppk] = findpeaks(Yin,varargin) 2 %FINDPEAKS Find local peaks in data 3 % PKS = FINDPEAKS(Y) finds local peaks in the data vector Y. A local peak 4 % is defined as a data sample which is either larger than the two 5 % neighboring samples or is equal to Inf. 6 % 7 % [PKS,LOCS]= FINDPEAKS(Y) also returns the indices LOCS at which the 8 % peaks occur. 9 % 10 % [PKS,LOCS] = FINDPEAKS(Y,X) specifies X as the location vector of data
  3 件のコメント
John D'Errico
John D'Errico 2022 年 2 月 14 日
The ENTIRE source IS available. All Walter showed you were the first 10 lines. However, nothing stops you from doing the same for the entire code.
Arkady Voloshin
Arkady Voloshin 2022 年 2 月 15 日
Great, thank you both very much, it is very useful.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by