Effacer les filtres
Effacer les filtres

How fix the error as: Unrecognized function or variable 'getAnsysInfo'?

38 vues (au cours des 30 derniers jours)
Alireza Babaei
Alireza Babaei le 31 Oct 2022
Commenté : Alireza Babaei le 31 Oct 2022
Dear all,
I have a question. I am using MATLAB and I have included a toolbox (from the company I work for). When running a code, such an error appears: (apparently the code I am running uses some functions like getAnsysInfo from the toolbox - but I am not sure even after proper installation of the toolbox I still get such an error and it cannot identify thegetAnsysInfo function!)
Unrecognized function or variable 'getAnsysInfo'.
Any ideas how to fix it? (I copied and pasted the directory path of a .m MATLAB code which includes the 'getAnsysInfo' code into the 'startup.m' script. But no success)!
Any ideas?
Thanks!

Réponses (1)

Cris LaPierre
Cris LaPierre le 31 Oct 2022
Modifié(e) : Cris LaPierre le 31 Oct 2022
Try adding the path to your MATLAB Path. If you are doing this in your startup.m file, see here. Otherwise, you can edit the path yourself. See here.
Ideally, if it is all packaged as a toolbox, you can install the toolbox by double clicking on the associated *.mltbx file. If that doesn't exist, you might want to recommend it. See here.
  3 commentaires
Cris LaPierre
Cris LaPierre le 31 Oct 2022
Modifié(e) : Cris LaPierre le 31 Oct 2022
The easiest thing to do, then, is navigate to the folder containg this module, the rt click on it and select Add to Path > Selected Folders and Subfolders
Then in your command window, run the following command
savepath
Alireza Babaei
Alireza Babaei le 31 Oct 2022
Great hepl, thanks!
the only method worked was the last one (I tried to type the command to get the module via include.module('path'), in the startup.m file. saving and typing matlabrc, but did not work.)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by