Problem in the initFcn callback of model

3 ビュー (過去 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 Center および File ExchangeAutomotive Radar についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by