Unrecognized function or variable, some functions can be accessed, some not.

조회 수: 5 (최근 30일)
Hello, I am trying to use a class in my program, but I get "Unrecognized function or variable 'class3'.".
What I do not understand is that I add the module which comprises this class at the beginning of my script with
addpath(genpath('/usr/local/MATLAB/R2019b/module'))
and this module has several classes in it, some of them I can access (like, a folder @class1, @class2), but some I cannot (@class3).
Any idea what I am doing wrong?
class3 is a new class that was introduced recently when I updated the module, whereas class1 and class2 are older. Is it possible it is linked ?
  댓글 수: 1
Jonas
Jonas 2021년 6월 1일
does it work when you change your matlab working directory to the path in which your class is located?

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

채택된 답변

Anne-Laure Argentin
Anne-Laure Argentin 2021년 6월 4일
In the end, I reinstalled the module through the Add-Ons. I may have updated it the first time through git.

추가 답변 (1개)

Jan
Jan 2021년 6월 1일
After inserting folders in Matlab's path, remember to refresh the toolbox cache:
rehash toolbox
% or permanently:
rehash toolboxcache

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by