I am having issues trying to generate the code of my program. How do I fix this?
11 views (last 30 days)
Show older comments
The error I am getting in my diagnostic viewer is as shown below.
The model 'MotorProgram' does not have continuous states, hence Simulink is using the solver 'VariableStepDiscrete' instead of solver 'ode45'. You can disable this diagnostic by explicitly specifying a discrete solver in the solver tab of the Configuration Parameters dialog, or by setting the 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics tab of the Configuration Parameters dialog
How should I deal with this?
0 Comments
Answers (1)
Sebastian Castro
on 2 Oct 2014
Hi Lewis,
First of all -- are you building a model in accelerator or rapid accelerator mode? Given that you're using a variable-step solver, I'm guessing you're not using Simulink Coder or Embedded Coder, right?
Secondly -- this is just a warning message, so whatever you're doing will still be successful (or error out for other reasons). This is an optimization that Simulink performs, in which it "downgrades" you to a more efficient solver because your model only has discrete states.
You can do one of 2 things, both of which require you to open up Simulation > Model Configuration Parameters.
1. Change the actual solver to VariableStepDiscrete in the Solver section:
2. Turn off the Automatic solver parameter selection warning diagnostic to none in the Diagnostics section. Note that the solver will still be changed under the hood, but you just won't get the warning message anymore. Therefore, be careful if you take this approach.
1 Comment
charanarur panem
on 2 May 2018
Dear Sebastian Castro, i need your help,the above same warning again and again came,i changed according your information,please try to pix it my problem.
See Also
Categories
Find more on Configure and View Diagnostics in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!