How to change globaly "Sample Time" to milliseconds?

MATLAB by default "Sample Time" measures in seconds! How do I change globaly "Sample Time" to milliseconds?

Respuestas (1)

Paul
Paul el 29 de Abr. de 2023
In the Simulink model, you can make the stop time whatever is desired. The simplest way is to just replace the 20.0 with whatever value you want in the Stop Time box in the Simulate section of the ribbon.
If you're using a fixed step solver, you can specify the solver step size, which is also called the global sample time, on the solver pane if you don't want Simulink to choose for you (you can also specifcy the simulation stop time here): Model settings -> Solver. If using a variable step solver, you can specifiy max step size on the solver pane if you don't want Simulink to choose for you.

Categorías

Más información sobre Configure Simulation Conditions en Centro de ayuda y File Exchange.

Preguntada:

el 28 de Abr. de 2023

Respondida:

el 29 de Abr. de 2023

Community Treasure Hunt

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

Start Hunting!

Translated by