how to get simulink stop time even if using code generation

2 visualizaciones (últimos 30 días)
I am trying to generate a chirp signal that is dependant on the simulation stop time(currently is set to 1 second). I do have matlab programming in the simulation so I keep running into an issue with "code generation" that won't let me do it. i've tried get_param as well as a couple other different tricks to be met with little to no progress.

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 21 de Mayo de 2020
Not sure what you mean.
>> vdp
>> get_param('vdp','StopTime')
ans =
'20'
  2 comentarios
Mitch Lautigar
Mitch Lautigar el 22 de Mayo de 2020
I get 'get_param' is not supported for code generation.
Fangjun Jiang
Fangjun Jiang el 22 de Mayo de 2020
Yes. Imagine that after the code is generated and compiled and is running in a CPU, there would be no "model" and no "stop time".

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by