Hi,
I am trying to read a file and find its peak. But the findpeak function keeps throwing errors. Please help. I am new to matlab.
[pks,locs] = findpeaks(KD);
plot(x,y,y(locs),pks,'or')
error message:
Error using findpeaks
Expected Y to be one of these types:
double, single
Instead its type was table.
Error in findpeaks>parse_inputs (line 199)
validateattributes(Yin,{'double','single'},{'nonempty','real','vector'},...
Error in findpeaks (line 136)
= parse_inputs(isInMATLAB,Yin,varargin{:});
Error in Untitled (line 6)
Peaks=findpeaks(ans);
2 件のコメント
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/718290-error-using-findpeaks-expected-y-to-be-one-of-these-types-double-single-instead-its-type-was-tab#comment_1266330
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/718290-error-using-findpeaks-expected-y-to-be-one-of-these-types-double-single-instead-its-type-was-tab#comment_1266330
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/718290-error-using-findpeaks-expected-y-to-be-one-of-these-types-double-single-instead-its-type-was-tab#comment_1266375
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/718290-error-using-findpeaks-expected-y-to-be-one-of-these-types-double-single-instead-its-type-was-tab#comment_1266375
サインインしてコメントする。