How to find the peaks of the importing data ?

2 ビュー (過去 30 日間)
Mohammed kandeel
Mohammed kandeel 2018 年 4 月 17 日
編集済み: Matt J 2018 年 4 月 17 日
I have imported two column to work space the first is Acc it's the acceleration and the second is Time
Time start from 0.001 to 1.638, it's 1683*1
Acc is variable but it's not around zero, it's 1683*1
Data=plot(Time,Acc)
Now i need to get the Peak values of the figure.
the figure is plotted but i got the following error
Error using findpeaks Expected Y to be one of these types:
numeric
Instead its type was matlab.graphics.chart.primitive.Line.
Error in findpeaks>parse_inputs (line 191) validateattributes(Yin,{'numeric'},{'nonempty','real','vector'},...
Error in findpeaks (line 134) = parse_inputs(Yin,varargin{:});
Thanks in advance.

採用された回答

Matt J
Matt J 2018 年 4 月 17 日

The function call should look like this,

 out = findpeaks(Acc,Time)
  2 件のコメント
Mohammed kandeel
Mohammed kandeel 2018 年 4 月 17 日
Lol i write it with wrong concept. so if i want to plot these values on the origin figure what should i do ?
Matt J
Matt J 2018 年 4 月 17 日
編集済み: Matt J 2018 年 4 月 17 日
You can just omit the output arguments
findpeaks(Acc,Time)
Or, see here for examples of other ways.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpectral Estimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by