I have a model which was designed in MATLAB2014a and I have used the preload function to set my parameters. it used to work perfect, until I installed MATLAB2014b and now everytime I open my model, I get an error which says "Undefined variable "myparam" or class "myparam.m" " , myparam.m is an mfile including my parameters. how can I stop getting this error and make it work?

답변 (1개)

Sean de Wolski
Sean de Wolski 2014년 10월 15일

0 개 추천

You'll need to add the directory containing my_param.m to the MATLAB path so MATLAB and SIMULINK can see it:

댓글 수: 3

Sahar
Sahar 2014년 10월 15일
thanks for your answer, but it already is in the same folder that I have all my codes and simulink models.
Sean de Wolski
Sean de Wolski 2014년 10월 15일
That does not necessarily mean that folder is on the path. You could be able to run things in that folder if it was the current one, but not when navigating away from it.
Sahar
Sahar 2014년 10월 16일
but there is no option to add it to the path, the only thing I see when right-clicking, is "indicate files Not on path" .

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

카테고리

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

질문:

2014년 10월 15일

댓글:

2014년 10월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by