How to create an array from a GUI where the array length changes by user's input?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Giuseppe Marino
il 10 Mag 2021
Modificato: Giuseppe Marino
il 10 Mag 2021
Hi everyone,
I was trying to make a simple GUI, I hope. The path that i wish to implement is the following one:
1: the user chooses the length of the array.
2: In the GUI, the users has to be able to insert all the variables oneshot, from 1 to array-length.
3: i need to save the array.
I hope i was clear. Thank you for the help.
0 Commenti
Risposta accettata
Jan
il 10 Mag 2021
Modificato: Jan
il 10 Mag 2021
The easiest way is to omit step 1, but to let the use create as many values as wanted and count them afterwards. There is a nice GUI for this job already: The editor. So what about opening it and typing:
data = [1, 3, 2, 4]
Then saving is easy also. Which format do you want?
Sorry for this trivial approach, why why reinventing the wheel?
1 Commento
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!