필터 지우기
필터 지우기

how to enable continuous-time matlab functions to initialized persistent variables

조회 수: 49 (최근 30일)
Hi, I have problem to start the simulation model in 2018b. The model was simulated flawless in matlab 2016b, however problem occur in 2018b
" MATLAB Function uses constructs that are invalid when the block specifies or inherits a continuous sample time. Invalid constructs include the use of persistent or global variables, calls to exported functions or using coder.extrinstic. Suggested Actions Set sample rate of this block to inherit the fastest discrete rate in the model. Fix Open the properties dialog of this block to set the sample time manually."
I've searched in other links, who suffered the same problem such as Migrating from Matlab 2015b to 2017b error - MATLAB Answers - MATLAB Central (mathworks.com), but the problem didn't solved yet. I found the problem starts at version 2017B. Then, I found on matlab Enable continuous-time MATLAB functions to write to initialized persistent variables - MATLAB & Simulink (mathworks.com), which I'm sure that this one is the solution (they mentioned it, that continuous time for persistents variables was turn off by default starting 2017b).
However, the problem still can't be solved, because on "Simulation Target" and "advanced parameter" as it mentioned, I still didn't find the option"Enable continuous-time MATLAB functions to write to initialized persistent variables"
Can anyone help this one? Thank you
  댓글 수: 4
rajmouli jujjavarapu
rajmouli jujjavarapu 2021년 7월 23일
hello, I'm Raj, I would like to mention that I have tried using Delay block as I'm trying to simulate an OFDM system. This also doesn't give a continous time. Please let us Know if your problem is fixed. It would help me as well.
Thank you
Daniel Sadono
Daniel Sadono 2021년 7월 24일
@rajmouli jujjavarapu Have you tried to use memory block? or you can try also Rate Transition Block.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by