Error message "Unable to resolve the name coder.target." when trying to use the downsample function
6 ビュー (過去 30 日間)
古いコメントを表示
Hello community,
after I installed Matlab R2021b (used R2018b before) I can't use the downsample function anymore.
If, for example, I try to run code like this:
example_dataset = [0 1 2 3 4 5 6 7 8 9 10 11];
example_reduced_dataset = downsample(example_dataset,2);
I get the following error messages, which I can't really interpret:
Unable to resolve the name coder.target.
Error in downsample (line 42)
isMATLAB = coder.target('MATLAB');
Error in untitled (line 2)
example_reduced_dataset = downsample(example_dataset,4);
Can anyone help me with this issue? Obviously I can work around and write my own function for downsampling input data but I would prefer making the downsample function usable again.
The problem only occurs with this specific function, anything else works properly after switching to the newer MATLAB version.
0 件のコメント
回答 (1 件)
Prasanna Konyala
2022 年 2 月 16 日
It works fine on my end, so I think the error is an installation issue. This type of issue can occur when the specified function is not on MATLAB search path. You could try the following troubleshooting steps:
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:
>> restoredefaultpath
>> rehash toolboxcache
After this step, please use MATLAB 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:
>> savepath
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!