Problem with findpeaks - error message of 'undefined variable "coder"'

Illustration
Farrahakhtar - 2021-02-24T11:06:46+00:00
Question: Problem with findpeaks - error message of 'undefined variable "coder"'

I am trying to use the findpeaks function out of the signal processing toolbox. When I enter something like...     data = [1 15 4 2] [pks,local] = findpeaks(data) ...I get     Undefined variable "coder" or class "coder.target". Error in findpeaks>parse_inputs (line 99) if coder.target('MATLAB') Error in findpeaks (line 71) [X,Ph,Pd,Th,Np,Str,infIdx] = parse_inputs(Xin,varargin{:}); 99 if coder.target('MATLAB') I am running Matlab 2014a with signal & stats & mapping toolboxes & have confirmed that I am  pointing to the correct findpeaks function via "which -all findpeaks"  

Expert Answer

Profile picture of John Michell John Michell answered . 2025-11-20

This looks like it might be a path issue. Try:
 
 
restore defaultpath
savepath
rehash toolboxcache
and restart MATLAB.

 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!