필터 지우기
필터 지우기

Matlab app designer can't go further than the first dropdown value

조회 수: 2 (최근 30일)
farzad
farzad 2020년 3월 24일
댓글: Sean de Wolski 2020년 4월 16일
Hi All
I have made an app with a dropdown and a push button. I should choose a value from dropdown and based on that the pushbutton will run a certain code pasted under it. let's say the dropdown values are 1,2,3
the problem is :
the app works fine If I choose the first value on dropdown menu and use the
if app.ConfigDropDown.Value == '1'
elsif app.ConfigDropDown.Value == '2'
elsif app.ConfigDropDown.Value == '3'
end
only if I choose the 1 , the code could run. otherwise it will give this error :
Matrix dimensions must agree.
Error in app/ExecuteButtonPushed (line 40)
if app.ConfigDropDown.Value == '2'
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 309)
Error while evaluating Button PrivateButtonPushedFcn.

채택된 답변

Sean de Wolski
Sean de Wolski 2020년 3월 24일
편집: Sean de Wolski 2020년 3월 24일
if app.ConfigDropDown.Value == '1'
elseif app.ConfigDropDown.Value == '2'
elseif app.ConfigDropDown.Value == '3'
end
You're missing some e's.
  댓글 수: 4
farzad
farzad 2020년 3월 24일
I don't know if putting a break in the app designer would really help since I can't see the output in the command prompt.
I only know that the app works if only the first drop down value is chosen, it does not work if I change it to other values
Sean de Wolski
Sean de Wolski 2020년 4월 16일
You can see the value in the command prompt. Once you're stopped, type the value at the command prompt.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile 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!

Translated by