フィルターのクリア

Data from matlab function one value at once in simulink

2 ビュー (過去 30 日間)
Muhammad Usman
Muhammad Usman 2022 年 3 月 23 日
回答済み: ag 2023 年 9 月 29 日
I am using a MATLAB function in Simulink to generate a trajectory based on some waypoints, but the problem is my Simulink model uses only one value at once but when I run the simulation the MATLAB functions generate all the trajectory coordinates at once like x = [1 2 3 .........] and y = [1 2 3 ......]. Is there any way the I can get only one value out of this MATLAB function like x = 1 and y = 1 at once and at the next step x = 2 and y = 3 and so on?
I know that using from-workspace we can do this but is there any way to do this inside Simulink?

回答 (1 件)

ag
ag 2023 年 9 月 29 日
Hi Usman,
I understand that you need to feed data one by one, to the trajectory, instead of all at once in SIMULINK.
To do so, setup the "Waypoint Navigation" block as per your needs, and add an iterator block(for eg, "For iterator") to your model, to iterate through the waypoint sequentially.
For more details, please refer to the following MATLAB documentation:
Hope this helps!
Best Regards,
Aryan Gupta

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by