MATLAB GUI and Simulink

2 views (last 30 days)
Sulaiman Khalid
Sulaiman Khalid on 19 Jul 2012
I have created a MATLAB GUI which works fine.
I also have a separate Simulink model that works fine as well from a script using the command:
options=simset('solver', 'ode8', 'fixedstep', timestep); sim('examplefile', t, options);
However, when i paste this code into my GUI, Simulink gives me an error:
Derivative input 1 of 'examplefile/Mass-Spring-Damper ODE/Integrator1' at time 0.0 is Inf or NaN. Stopping simulation. There may be a singularity in the solution.....
Any suggestions or examples of using the 'sim' command in a GUI.

Answers (0)

Categories

Find more on Manual Performance Optimization in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!