Evaluate function real-time in Simulink
1 回表示 (過去 30 日間)
古いコメントを表示
Hy,
I have the following function in Simulink, which i would like to evaluate for all X, Y values in real-time.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235430/image.png)
The inputs for X and Y are real time values, changing with sample time, PX and PY are column vectors, which i am searching the optimal point in, LAD is a constant value.
The function searches the point exactly as far from X, Y as the value of LAD and would give it back through GX and GY in real time, but shows me the following error:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235431/image.png)
The function ports are shown here:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235432/image.png)
How can I get this done?
Thank you for your help in advance.
Gergely Hunyady
0 件のコメント
回答 (1 件)
Fangjun Jiang
2019 年 8 月 27 日
Open the MATLAB function, click "Edit Data", specify the "size" of output GX and GY. Most common is the change from "-1" (inherient) to "1" (scalar).
参考
カテゴリ
Help Center および File Exchange で Arduino Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!