- In the “Component Browser” section on the right of the Onramp window, click on the “app.GridSizeSpinner” component under “myapp >app.UIFigure” (the name of the spinner might be different based on the name you give to the spinner).
- Click on the “Callbacks” tab.
- For the “ValueChangedFcn” select the “NewMazeButtonPushed” from the drop-down menu.
- Now, switch to “Code View” and add the following code:
how to use amaze function with spinners value as an input
조회 수: 37 (최근 30일)
이전 댓글 표시
In app building onramp(task 5) im unable to link the amaze function with spinners value as an input
댓글 수: 0
답변 (1개)
Arun
2024년 2월 12일
Hi,
I understand that in “App Building Onramp” you are facing difficulty to link the “Spinner” component value to the “amaze” function in task-5 of the “Add App Behavior > Add Different Components > (1/3) Value Changed Callback” section.
This might be due to not addressing the “Spinner” component value properly, here are steps that will help you to complete the task:
[wall, wx, wy] = amaze(app.GridSizeSpinner.Value); %check the name in Component Browser.
plot(app.UIAxes,wall,"XData",wx,"YData",wy,"NodeLabel",[])
axis(app.UIAxes,"equal")
This should help you complete the task. Here is a screenshot of successfully submitted task to help you with your implementation.
For more information, please refer the MATLAB documentation related to App building Components: https://www.mathworks.com/help/matlab/creating_guis/choose-components-for-your-app-designer-app.html
Hope this helps.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!