In case paramter file is placed in the different folder where simulink model is not placed, path setting has to be changed.
* Model pre-load fuction
% Get a model path
[pathstr,~,~]=fileparts(get_param(gcs,'filename'));
% Create a parameter file path
path=sprintf('%s%s',pathstr,'\ParameterChanger');
cd(path);
% Load a parameter m script
testp;
cd ..
No comments:
Post a Comment