![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/176125/image.png)
how to use PreLoadFcn
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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?
0 Kommentare
Antworten (1)
Sean de Wolski
am 15 Okt. 2014
You'll need to add the directory containing my_param.m to the MATLAB path so MATLAB and SIMULINK can see it:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/176125/image.png)
3 Kommentare
Sean de Wolski
am 15 Okt. 2014
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.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!