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?

Risposte (1)

Paul
Paul il 29 Apr 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.

Categorie

Scopri di più su Configure Simulation Conditions in Centro assistenza e File Exchange

Richiesto:

il 28 Apr 2023

Risposto:

il 29 Apr 2023

Community Treasure Hunt

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

Start Hunting!

Translated by