While running the code, which is already on the path, but still MATLAB asks to "add to path" it? Also, designfilt does not work.
3 次查看(过去 30 天)
显示 更早的评论
My directory and the .m file is on the path but while running it MATLAB says the file is not on the path so I have to add to path it again. Then while running the code, MATLAB gives error series like below;
Error: File: strncmpi.m Line: 1 Column: 1
Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII
characters.
Error in matlab.internal.math.partialMatchString (line 18)
tf = strncmpi(str, options, max(N, strlength(str)));
Error in cell/unique (line 102)
foundflag = matlab.internal.math.partialMatchString(flag,flagvals);
Error in designfilt>checkForRepeatedProperties (line 795)
propNamesUnique = unique(propNames,'stable');
Error in designfilt>parseAndDesignFilter (line 504)
checkForRepeatedProperties(propNames);
Error in designfilt (line 224)
[err,requestedResponse,parseParams,h] = parseAndDesignFilter(inputParamValueNames, varargin{:});
Error in PreProcessing1 (line 25)
Notch50=designfilt('bandstopiir','FilterOrder',20, ...
The code belonging to the designfilt is below starting with Line 25;
25 Notch50=designfilt('bandstopiir','FilterOrder',20, ...
26 'HalfPowerFrequency1',49,'HalfPowerFrequency2',51, ...
27 'SampleRate',250);
I have closed the designfilt part of the command so the code can continue to the next step but it has given error again. The code is about outliers.
for i=1:rs
[~,TFfeat1(i,:)] = filloutliers(Sig1(i,:),'clip','percentiles',[3 97]);
[~,TFfeat2(i,:)] = filloutliers(Sig2(i,:),'clip','percentiles',[3 97]);
end
Also these codes were working fine previously.
Some of the posts have suggestions for similar errors. I have created a new preference folder but it didn't work. Also I have tried the below commands, again it did not work. I could not update the MATLAB and also, I could not add Add-Ons. I am using R2020a, NEED HELP URGENTLY, PLEASE.
restoredefaultpath
rehash toolboxcache
2 个评论
Walter Roberson
2022-7-26
Your strncmpi.m is corrupted, or else you have someone else's version on your path. What shows up for
which -all strncmpi
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!