Problem in the initFcn callback of model
7 次查看(过去 30 天)
显示 更早的评论
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/214680/1555556626(1).jpeg)
![1555556626(1).jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/214680/1555556626(1).jpeg)
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,
0 个评论
回答(1 个)
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Automotive Radar 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!