Findpeaks error - Undefined function 'chkinputdatatype' for input arguments of type 'double'.

3 次查看(过去 30 天)
I was used to run at matlab2014a the findpeaks.m function with a lot of arguments without error. But, after I installed Matlab2014b, the same matlab file code did not run anyway in 2014b. To solve this problem, I usually run it (zcc.m) using matlab2014a (I have both installed). Unfortunately today, neither 2014a or 2014b, runs findpeaks.m right now. The error message, when running both MATLAB Version: 8.3.0.532 (R2014a) or Version: 8.4.0.150421 (R2014b)- MS Windows 7 Prof. V6.1 (Build 7601: Service Pack 1) - Java Version: Java 1.7.0_11-b21, is:
"Error using findpeaks (line 131) Undefined function 'chkinputdatatype' for input arguments of type 'double'.
Error in zcc (line 106)
[Hp,b]=findpeaks(Hm,'MinPeakHeight',mean(H),'MinPeakDistance',ii);"
thks.

采纳的回答

Carlos Bezerra
Carlos Bezerra 2015-8-4
Hi Rohit,
Thank you. But unfortunately I still have the same error message. No, chkinputdatatype function is not shadowed. I ran " >> which -all chkinputdatatype" and the single output was C:\Program Files\MATLAB\R2014a\toolbox\signal\signal\private\chkinputdatatype.m % Private to signal. I ran at Matlab201b and the single output was C:\Program Files\MATLAB\R2014b\toolbox\signal\signal\private\chkinputdatatype.m % Private to signal. I do not rename the other files because I do not have them. After, I ran ">> restoredefaultpath", ">> rehash toolboxcache". But, I do have the same error message in both 2014a and 2014b.

更多回答(1 个)

Rohit Kudva
Rohit Kudva 2015-7-16
Hi Carlos,
There is a possibility that the 'chkinputdatatype' function may be shadowed. This might happen because of a third-party toolbox or due to some user-defined function with the same name. You can check if the function is shadowed by executing the following line of code:
>> which -all chkinputdatatype
The output of which should be
matlabroot\toolbox\signal\signal\private\chkinputdatatype.m % Private to signal
Where matlabroot is the path to the folder where MATLAB is installed. In case the 'chkinputdatatype' function is shadowed, the output will have multiple file locations in that case. Please rename the other files.
If the above workaround does not work or if the path to the original function does not exist, execute the following commands:
>> restoredefaultpath
>> rehash toolboxcache
The first command will restore the MATLAB path to its factory-installed state. The second command will refresh the function and file system path caches. If executing the above two commands resolves this issue then execute the following command to save it across sessions:
>> savepath
I hope these workarounds help you resolve this issue.
- Rohit

类别

Help CenterFile Exchange 中查找有关 Time-Frequency Analysis 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by