How can I store 10 different variables in a single row vector in workSpace throught editor Window ?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Stephen23
2017-5-3
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".
回答(1 个)
Jan
2017-5-3
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!