input function to enter array elements
Mostrar comentarios más antiguos
Hi guysy,
I have different cases I want to calculate and plot. I am wondering if there is anyway to use input function to prompt user to choose the cases through typing the cases numbers to array with flexible length for example Cases=inpute [ 1 3 5] or Cases=inpute [ 1 3 5 9]
I appreciate your help thanks
Respuesta aceptada
Más respuestas (1)
Dr. Kelsey Joy
el 27 de Nov. de 2021
0 votos
Also you can consider using the listdlg() function, if you want another way to collect this data with set values and are okay with dialog boxes.
Another thing you could consider is having the user input numbers one at a time in a for loop (see example: https://www.mathworks.com/matlabcentral/fileexchange/102644-educational-building-arrays-with-for-loops-d-d?s_tid=prof_contriblnk).
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!