While running the code, which is already on the path, but still MATLAB asks to "add to path" it? Also, designfilt does not work.

6 vues (au cours des 30 derniers jours)
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 commentaires
Walter Roberson
Walter Roberson le 26 Juil 2022
Your strncmpi.m is corrupted, or else you have someone else's version on your path. What shows up for
which -all strncmpi
Esra Kaya
Esra Kaya le 27 Juil 2022
This is what I get, but when I see the biosig4octmat (which I did not use ever, but downloaded for some reason) I deleted it and the problem is solved. I guess like you have said I had another version of it on my path. Thank you.
E:\\Database\BCI Competition IV\Dataset-2a\biosig4octmat-3.7.7\biosig\maybe-missing\strncmpi.m
C:\Program Files\MATLAB\R2020a\toolbox\matlab\strfun\@opaque\strncmpi.m % opaque method
strncmpi is a built-in method % slreq.datamodel.AttributeKindEnum method
strncmpi is a built-in method % slreq.datamodel.AttributeRegType method
strncmpi is a built-in method % slreq.datamodel.AttributeTypeEnum method
strncmpi is a built-in method % slreq.datamodel.CustomIdNumbering method
strncmpi is a built-in method % slreq.datamodel.MappingDirectionEnum method
strncmpi is a built-in method % mtree.Type method
strncmpi is a built-in method % connector.internal.LoggerLevel method
strncmpi is a built-in method % connector.internal.PromiseState method
strncmpi is a built-in method % matlab.lang.OnOffSwitchState method
C:\Program Files\MATLAB\R2020a\toolbox\matlab\bigdata\@tall\strncmpi.m % tall method
C:\Program Files\MATLAB\R2020a\toolbox\parallel\parallel\@codistributed\strncmpi.m % codistributed method
built-in (C:\Program Files\MATLAB\R2020a\toolbox\matlab\strfun\strncmpi)

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by