Error in wavedec2 Function
1 view (last 30 days)
I've been using this function up and until yesterday. Since today wavedec2 is throwing an error saying that 'Lo_D' is an Unrecognized Function or Variable. This is the error it throws up:
Unrecognized function or variable 'Lo_D'.
Error in wavedec2 (line 9)
[x,h,v,d] = dwt2(x,Lo_D,Hi_D); % decomposition
Error in WaveletCompress_V4 (line 24)
[C,S] = wavedec2(X, n, wname);
Let's forget about my code. It throws the same error even for procedures through the Wavelet Analyzer App. It's like this function doesn't work for me anymore or so. Kindly do help me fix this. Thanks.
Pratyush Roy on 30 Sep 2021
The following steps might be helpful:
Before modifying the search path, it is important to take a backup of your 'pathdef.m' file, which can be located by using the command:
>> which -all pathdef
Before proceeding, ensure that you make a safe copy of the file by copying it to a folder outside of your MATLAB path.
After taking the backup, please execute the following commands in the MATLAB Command Window to restore the default MATLAB search path and rehash the toolbox cache:
>> rehash toolboxcache
After this step, please use MATLAB/Simulink to see if the issue occurs again. If the issue is resolved, then you may want to save the new MATLAB search path by executing the following command:
NOTE: This will remove any custom paths you may have created. The following MATLAB Answers post is an additional resource on how to back them up:https://www.mathworks.com/matlabcentral/answers/166871-how-will-running-the-restoredefaultpath-and-savepath-commands-affect-my-custom-paths-and-how-do-i-ba
Hope this helps!