How can I store 10 different variables in a single row vector in workSpace throught editor Window ?

1 vue (au cours des 30 derniers jours)
I had stored values taken from 10 editboxes in 10 different variables at their respective callbacks.Then I had stored these values in the base workspace, again in 10 different variables.Now I want to store them in a single Row vector. How can I do that.
  2 commentaires
Stephen23
Stephen23 le 3 Mai 2017
vec = [a,b,c,d,e,...]
But your code would likely be simpler and more reliable if you put into that vector right from the very start, and avoid having lots of individual variables hanging around. MATLAB comes from "MATrix LABoratory", not from "let store everything in lots of separate variables".
N/A
N/A le 3 Mai 2017
I am new to MATLAB and I am facing many problems in coding, could you please help me solving this particular one.
Actually I have to take input from user through editbox in matlab gui. Editbox input has to be validate before accepting any input. Then all these values need to be save in a row vector. This code has to be written on pushbutton callback.
But I can't find a way to save these values directly in the workspace.

Connectez-vous pour commenter.

Réponses (1)

Jan
Jan le 3 Mai 2017
Instead of polluting the base workspace with different variables, better store the values inside the figure. Search in this forum for "share data between callbacks". Finally do not start the further processing from the command window, but from a button in the GUI.

Catégories

En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by