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

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!

답변 (1개)

Cris LaPierre
Cris LaPierre 2022년 10월 31일
편집: Cris LaPierre 2022년 10월 31일

1 개 추천

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

Thanks Cris,
it is not *.mltbx file (so we only add some files). Such files are stored in a specific folder which we call a module folder.
I think i need to go over the 2 links you provided to add the path to the startup file (I did it before but again it fails and I need to add the modeules and the corresponding folders each tmie I launch MATLAB). Let me see if I can fix it some how.
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
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.)

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

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

질문:

2022년 10월 31일

댓글:

2022년 10월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by