what is eml_invariant function ?

11 visualizaciones (últimos 30 días)
Maina Kerbrat
Maina Kerbrat el 14 de Nov. de 2018
Comentada: Walter Roberson el 28 de Feb. de 2023
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 comentarios
Agnieszka Wegrzyn
Agnieszka Wegrzyn el 28 de Feb. de 2019
Editada: Agnieszka Wegrzyn el 28 de Feb. de 2019
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 el 17 de Nov. de 2021
Editada: Brian Yellen el 17 de Nov. de 2021
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

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 26 de Mayo de 2022
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 comentarios
Rizwana Ahmad
Rizwana Ahmad el 28 de Feb. de 2023
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 el 28 de Feb. de 2023
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'

Iniciar sesión para comentar.

Categorías

Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by