- Create your MATLAB app using the App Designer.
- Add a plot to your app's UI where the vehicle count vs. time data is displayed.
- Add a callback function to the plot's ButtonDownFcn property. This function will be triggered when the user clicks on the plot.
- In the callback function, capture the x-coordinate (time) of the clicked point using the CurrentPoint property of the plot.
- Retrieve the corresponding value from the plot data based on the clicked x-coordinate (time).
- Update the text edit field in your app with the retrieved value.
Numeric text edit field filled out automatically when I clicked in the plot's either X_axis or Y_Axis. Is that possible in matlab app designer?
4 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1441908/image.png)
For example: Here, we have plot vehicle count vs time. I want to use plot's some values in my app for further process. Like if I click on 15s on time_axis, it take value from plot and fill that value in text edit field of the app. So, I don't have to put value manually in edit field. Is that possible in matlab? if yes, could you share links, where I can get idea about it.
0 件のコメント
採用された回答
Menika
2023 年 7 月 25 日
Hi,
Yes, you can use MATLAB's interactive features to capture user input from a plot and update a text edit field in your app accordingly
Hope it helps!
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!