MATLAB Answers

Why Matlab and Simulink have different Plot for the same modulo function?

19 views (last 30 days)
Chenji Tu
Chenji Tu on 1 Apr 2021
Commented: Chenji Tu on 1 Apr 2021
Dear community,
as shown in the attached .png, it seems for the same modulo function, the plot from Matlab looks not the same as that from Simulink.
Changing the Solver Settings doesn't make a difference.

Accepted Answer

Fangjun Jiang
Fangjun Jiang on 1 Apr 2021
The step size is more important than solver in this case. Reducing the step size to be 1 or 0.5 and making it fixed would resolve the problem.

Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!