Findpeaks error - Undefined function 'chkinputdatatype' for input arguments of type 'double'.
Show older comments
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.
Accepted Answer
More Answers (1)
Rohit Kudva
on 16 Jul 2015
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
Categories
Find more on Downloads in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!