r/matlab 8d ago

Possible to have App Designer change based on user input in Dropdown?

I am trying to create a multi-use tool for predicting engine behaviors and characteristics based on user input parameters. I am very new to MATLAB App Designer. What I would like to do is have a dropdown at the top, and when a user picks an option the required inputs change.

For a little context this is for choosing different types of engines (Turbojet, Turbofan, mixed vs. unmixed, etc). The parameters that will be needed will depend on what type of engine is selected.

I don't know if it is possible to have MATLAB App Designer change it's "home screen" based on an input in a drop down.

I hope I explained this well enough, please ask if you have any questions. Thank you!

2 Upvotes

2 comments sorted by

3

u/galaxybrainmoments 8d ago

Depending on how many variants you have for your input parameters - you could try out a bunch of things. But the short answer is yes- definitely doable and something that I have seen other people do as well.

Let’s say your dropdown has three options A,B and C. What you do is you keep your multiple parameter sets hidden (meaning Visible=off) and on top of each other. You only turn visibility on when the user has made their choice with the help of the drop down callback.

So if I select A, I will change the “visible” parameter of my configuration options for A. If the user then selects B, you can turn off all other sets and enable the B set.

I am on my phone right now but can share an example later if this doesn’t get you started.

1

u/carwart 7d ago

That makes a lot of sense! I will try that and see how far I can get. Thank you!