what is eml_invariant function ?

조회 수: 11 (최근 30일)
Maina Kerbrat
Maina Kerbrat 2018년 11월 14일
댓글: Walter Roberson 2023년 2월 28일
Hi All,
I am trying to use the pca function. I run the example available on the doc function:
I have this message error :
>> [wcoeff,score,latent,tsquared,explained] = pca(ratings,'VariableWeights',w);
Undefined function or variable 'eml_invariant'.
Error in coder.internal.parseParameterInputs (line 82)
eml_invariant(nargin >= 2, ...
Error in pca (line 51)
optarg = coder.internal.parseParameterInputs(parms,popt,varargin{:});
Do you have an idea?
thanks
  댓글 수: 2
Agnieszka Wegrzyn
Agnieszka Wegrzyn 2019년 2월 28일
편집: Agnieszka Wegrzyn 2019년 2월 28일
Hey, I got the same problem trying to install devTools. I have a fresh install of Matlab_2018b and this is a first time I have problem with this istallation.
Undefined function or variable 'eml_invariant'.
Error in computer (line 10)
eml_invariant(strcmp(coder.target,'sfun') || ...
Error in filesep (line 11)
if strncmp(computer,'PC',2)
Error in installDevTools (line 107)
rmpath(genpath([devToolsDir filesep '.git']));
Brian Yellen
Brian Yellen 2021년 11월 17일
편집: Brian Yellen 2021년 11월 17일
Hi All - I just installed the signal processing toolbox, which is included with my Uni's license. In addition to thei error message: Unrecognized function or variable 'eml_invariant', I cannot get the toolbox function 'findpeaks' to work. Just continuing this thread in case someone sees it and has an idea.
nrecognized function or variable 'eml_invariant'.
Error in setdiff (line 11)
eml_invariant(nargin >= 2, ...
Error in close
Error in close
Error in Load_wells_discharge_90s (line 2)
close all

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2022년 5월 26일
eml_invariant is a function that would normally only be used during code generation. setdiff() and computer() do not contain any reference to them in normal times.
However, if you do not have a license for a toolbox, and you try to add to the path files that are intended to be used only by MATLAB Compiler or MATLAB Coder, then you can encounter problems with eml_invariant not being found, because you are executing a different version of the code only intended for code generation.
You need to install and license the missing toolbox, and make sure that the code generation directories are not on your MATLAB path.
  댓글 수: 2
Rizwana Ahmad
Rizwana Ahmad 2023년 2월 28일
Hi Walter,
I am also stuck in similar error. I have similar issue, i just added the "Robotics System Toolbox" to my MATLAB 2022b from my uni license. Now it has somehow made my MATLAB not functional! whenever I try to run even the simplest things on commond prompt like a=1,
it gives a pop up error of Unrecognized function 'eml_invariant' for input argument type of 'char'. Not sure what it means. Also I am unable to access the add-on manager, it gives me an error, like the following:
Error using fullfile
Invalid default value for property 'ExternalDependencyDir' in class 'coder.internal.portableEnv':
All inputs must be strings, character vectors, or cell arrays of character vectors.
Error in getenv>getenvImpl (line 26)
nameV = coder.internal.portableEnv.constOrNullTerminateString(name);
Error in getenv (line 18)
value = getenvImpl(name);
Error in matlab.internal.getDebugPort (line 7)
if isempty(getenv("MW_INSTALL"))
Error in matlab.internal.addons.AddOnsWindow (line 40)
obj.debugPort = matlab.internal.getDebugPort;
Error in matlab.internal.addons.Explorer/createNewWindow (line 111)
obj.addOnsWindowInstance = matlab.internal.addons.AddOnsWindow(obj.WINDOW_TITLE, clientType, obj.windowStateUtil.getPositionForExplorer);
Error in matlab.internal.addons.Explorer/show (line 62)
obj.createNewWindow;
Error in matlab.internal.addons.launchers.showExplorer (line 140)
matlab.internal.addons.Explorer.getInstance.show(navigationData);
Walter Roberson
Walter Roberson 2023년 2월 28일
I think in that case the first thing I would do would be to find your preferences directory, exit matlab, rename the preferences directory, and restart MATLAB. https://www.mathworks.com/help/matlab/ref/prefdir.html
On Windows it would typically be 'C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2022b'
On Mac it would typically be '/Users/username/Library/Application Support/MathWorks/MATLAB/R2022b'

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by