have a reference model that uses global Simulink parameters declared in the base workspace and after creating a protected model from it, I get the following error when trying to simulate the model from a function with different values for the Simulink parameters:
ANSWER
Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.
1) A reason why you might get that error is if the parameters are in the function's workspace so they are not accessible to the model. You can resolve this issue by including the following in your function:
>> assignin('base','name_of_var', name_of_variable);
Comments
Post a Comment