how to create column vector by inputs with matlab app designer to have final vector throught inputs

i want get a column vector or row using app designer to use it in its final form not one by one throught user inputs which are changed.
thanks for help

6 comentarios

If I am understanding correctly, you want to get a vector of data from the user as an input, and then process it afterwards?
dpb
dpb el 6 de Jul. de 2025
Editada: dpb el 6 de Jul. de 2025
User numeric data other than a single element isn't really well handled by the available controls; probably the most convenient for the user would be to use a <Table> component in which the user can edit the various columns (or rows depending on your chosen orientation). In the examples there is one on code response to user editing.
The alternative is just a text box in which user types free form data...this is possible but fraught with all the issues of bad syntax, bum characters, etc., etc., ... to handle.
Other than that, one is basically reduced to either multiple text boxes or other controls like the slider, etc., for the various elements and then put them together programmatically for the vector, or prompt in a loop. I don't think there's any really ideal solution.
I have resorted with the Foundation office staff to opening an Excel spreadsheet for them to work in, but that also has issues of getting the user to follow the rules in formatting, placing, saving the file before continuing, etc., etc., ...
I second dpb's suggestion, a UITABLE is likely a good approach.
"... a UITABLE is likely a[s] good approach.[as there is]"

Iniciar sesión para comentar.

 Respuesta aceptada

You can use a table. Attached is a working example.

3 comentarios

If this Answer solves your original question, then could you please click the "Accept this answer" link to award the answerer with "reputation points" for their efforts in helping you? They'd appreciate it. Thanks in advance. 🙂 Note: you can only accept one answer (so pick the best one) but you can click the "Vote" icon for as many Answers as you want. Voting for an answer will also award reputation points. You cannot vote for or accept comments.
For full details on how to earn reputation points see: https://www.mathworks.com/matlabcentral/answers/help?s_tid=al_priv#reputation

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by