How to create variables L1, L2, L3,.... Ln and assign user input values from GUIDE to these variables.
8 次查看(过去 30 天)
显示 更早的评论
I have a GUI table from GUIDE where the user inputs values in the third column. Now I would like to create variables L1, L2, L3, ...... up to Ln (where n is also specified by the user in the GUI) and assign the values from the third column to each of these variables. How can I do this? I gave the following code for j=1:n-1 eval(sprintf('L%d = %d', j, tableData(j,3))) end
But Matlab says sprintf function is not defined for cell inputs.
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!