フィルターのクリア

Drag and Drop Custom Blocks on UIAxes in MATLAB

3 ビュー (過去 30 日間)
Fawad Farooq Ashraf
Fawad Farooq Ashraf 2023 年 12 月 2 日
回答済み: Voss 2023 年 12 月 21 日
Hello. I'm trying to build an app on the MATLAB App Designer. The app is about Path Planning and Path Following of a Ground Vehicle. The thing is that in the Path Planning Algorithm, I want to add certain Obstacles (explained in the figure below), and then the algorithm will find the optimal path accordingly.
What I want is to make these movable. Or maybe to pick and drop from a sidebar? Is it possible to do so that I can place obstacles wherever I want?
  1 件のコメント
Ayush Singh
Ayush Singh 2023 年 12 月 21 日
Hi Fawad,
I understand you want to add movable objects in the UI axes.
Can you let me know that do you want them to move randomly or based on some mouse movement or key press?

サインインしてコメントする。

回答 (1 件)

Voss
Voss 2023 年 12 月 21 日
"What I want is to make these movable. Or maybe to pick and drop from a sidebar? Is it possible to do so that I can place obstacles wherever I want?"
All of those things are possible. You will need to define the UIFigure's WindowButtonDownFcn, WindowButtonMotionFcn, and WindowButtonUpFcn. See the "Window Callback" section of this page: https://www.mathworks.com/help/matlab/ref/matlab.ui.figureappd-properties.html
Good luck!

カテゴリ

Help Center および File ExchangeDevelop uifigure-Based Apps についてさらに検索

タグ

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by