Error “Accelerator mode is not supported through the S-Function API” when calling set_param in Accelerator mode.

Technical Source
2 min readAug 31, 2021

--

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?

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.

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:

>> set_param('vdp','StopTime','100')

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

https://www.matlabsolutions.com/resources/error-accelerator-mode-is-not-supported-through-the-s-function-api-when-calling-set-param-in-accelerator-mode-.php

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet