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'
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.