Problem in the initFcn callback of model

조회 수: 1 (최근 30일)
Albert Hao
Albert Hao 2019년 4월 18일
편집: Honglei Chen 2019년 4월 18일
Hi, everyone. I am a student from China, so plz forgive me for my poor English. I have a problem while using the callback funtion of Simulink. I found an example of the FMCW radar in the Mathwork(https://ww2.mathworks.cn/help/phased/examples/automotive-adaptive-cruise-control-using-fmcw-and-mfsk-technology.html?searchHighlight=FMCW&s_tid=doc_srchtitle). I want to do some changes to this example to meet my need. Firstly I saved this example as another name in another path, then I rewrite the initial function of this model which has the same name with the old initial function. 1555556626(1).jpg
However, I found though i had changed the initial function, the model still use the old function. If I change the name of the function, the system told me it can't find the function. I don't know why. Please help me solve it,

답변 (1개)

Honglei Chen
Honglei Chen 2019년 4월 18일
편집: Honglei Chen 2019년 4월 18일
When you say that you rewrote the init function, did you overwrite it? If so, it should use the same one. You can certainly rename the function and then call the new function name in the callback instead. The fact that MATLAB complains about not finding the function seems to suggest that your helper function is not on the path. Did you run the model from where you saved those files?
HTH

카테고리

Help CenterFile Exchange에서 Signal Radiation and Collection에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by