필터 지우기
필터 지우기

how to get simulink stop time even if using code generation

조회 수: 2 (최근 30일)
Mitch Lautigar
Mitch Lautigar 2020년 5월 21일
댓글: Fangjun Jiang 2020년 5월 22일
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.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2020년 5월 21일
Not sure what you mean.
>> vdp
>> get_param('vdp','StopTime')
ans =
'20'
  댓글 수: 2
Mitch Lautigar
Mitch Lautigar 2020년 5월 22일
I get 'get_param' is not supported for code generation.
Fangjun Jiang
Fangjun Jiang 2020년 5월 22일
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".

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by