How to find peaks of two arrays of same length?

1 回表示 (過去 30 日間)
NikePro
NikePro 2016 年 12 月 9 日
コメント済み: Image Analyst 2016 年 12 月 10 日
Hi all,
I have a csv file that I opened using csvread and then I set up my arrays as;
Array1 = M(:, 1);
Array2 = M(:, 2);
plot(Array1,Array2)
where M is my csvread. The plot came out nicely but I am trying to find the peaks of this data. I have tried to use the findpeaks and [pks,locs] = findpeaks(data); but it just keeps saying that findpeaks is undefinded.
I'd appreciate any help on this!

回答 (1 件)

Star Strider
Star Strider 2016 年 12 月 10 日
If you do not have the findpeaks function, you likely do not have the Signal Processing Toolbox.
Run this line in your Command Window (or a script file):
ver signal
If you have the Signal Processing Toolbox, it will tell you.
  1 件のコメント
Image Analyst
Image Analyst 2016 年 12 月 10 日
And of course you wouldn't do
[pks,locs] = findpeaks(data);
you'd do
[pks, locs] = findpeaks(Array2);

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

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by