1
votes

So I'm new to Simulink (I've been working on it for less than 1 hour). I've put a "Sine Wave" block with an amplitude of 3 and a frequency of 2*pi and connected it to a "Scope". The problem is that the plot has some kind of edges:

enter image description here

Would you mind telling me, please, how to fix this?

Thank you !

1

1 Answers

4
votes

This is because by default Simulink chooses a time step of the simulation end time divided by 50, unless the dynamics of the model requires smaller time steps (for a variable step solver).

I assume you haven't changed any of the solver settings, in which case you probably have ode45 as a solver with the default settings. Change the MaxStepSize to be something small, say 0.1s or even smaller. The simulation will take a bit longer but you'll get more data points and therefore a smoother curve.

Have a read of Choose a Solver in the Simulink documentation for more details.