MATLAB Answers

why does sine curve not properly plotted in simulink

26 views (last 30 days)

  1 Comment

Shivank Anchal
Shivank Anchal on 20 Jun 2019
when the stop time is 10 seconds,it gives a proper sine curve, but when I increase the time it gives the sine graph unlike sine graph.Pls help me with this, why is this happening?

Sign in to comment.

Accepted Answer

Shubham Gupta
Shubham Gupta on 21 Jun 2019
I reckon that you are using variable time step so when you increase your time, time step also increases. So, the curve is not as smooth as you have expected. To solve this use fixed time step and keep it small to get smoother curve.
Go to File->Simulink Preferences->Under Sover option, choose "fixed step" type and then choose fixed time step like 1ms


Shivank Anchal
Shivank Anchal on 21 Jun 2019
where is the solver option,i did not find it any where, pls help me.
Shubham Gupta
Shubham Gupta on 27 Jun 2019
I am not if this info is still relevant but I reckon you are using so you might have to access solver options using different method. couple of methods that might work are:
Method 1 :
If you can see a gear type button in the simulink's toolbar, you can use that to change the sample time
Method 2 :
Go to Simulink->Configuration Parameter
Method 3 :
Press Ctrl+F to open Configuration Parameters directly
I hope it works !

Sign in to comment.

More Answers (0)

Translated by