error in envelope function

13 次查看(过去 30 天)
The envelope function always gives me an error when I enter the input 'peaks', whatever the data may be. The error that appears is this:
Error using findpeaks
Too many input arguments.
Error in envelope>envPeak (line 181)
[~,iPk] = findpeaks(double(x(:,chan)),'MinPeakDistance',n);
Error in envelope (line 79)
[yupper, ylower] = envPeak(x,n);
I have looked at three different versions of Matlab and it gives me the error in all three.

采纳的回答

Steven Lord
Steven Lord 2024-4-25
移动:Steven Lord 2024-4-26
Let's make sure you're using the findpeaks function included as part of Signal Processing Toolbox. What does this command show when you run it in the three different versions of MATLAB where this error occurs?
which -all findpeaks
/MATLAB/toolbox/signal/signal/findpeaks.m /MATLAB/toolbox/signal/gpu/@gpuArray/findpeaks.m % gpuArray method
  1 个评论
Victor
Victor 2024-4-26
移动:Steven Lord 2024-4-26
Thank you so much!
Here was the problem. when i use this comand:
which -all findpeaks
There was one more carpet:
CHRONUX_SSP\chronux_2_10_code_and_data\chronux\spectral_analysis\continuous\findpeaks.m
And it was this carpet where it was the problem with findpeaks function.
I really appreciate your response

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by