Error “Accelerator mode is not supported through the S-Function API” when calling set_param in Accelerator mode.
I have a model open in accelerator mode. When I call ‘set_param’ to change the values of several model parameters, I get the following confusing error:
>> set_param(vdp,'StopTime','100')Accelerator mode is not supported through the S-Function API
Why is this? How can I fix this?
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.
This error message is misleading, but there is a syntax error in the call to ‘set_param’ used here. The object input argument is supposed to be passed in as a string, character array, or handle to the object being modified.
In this case, passing in vdp (without quotes) is invalid because vdp is not evaluated correctly by set_param. Instead, pass in the name of the model in single quotes. The correct syntax is as follows:
If you change the model back to Normal mode then re-run the original command without quotes, the error message becomes more clear:
SEE COMPLETE ANSWER CLICK THE LINK