Tables in GUIs

1 次查看(过去 30 天)
John
John 2012-6-11
I have a 6x3 table in a GUI and when the user inputs numbers I would like to create a plot.
Beforehand however, I have another set of vectors (30x4) that stores the x-values and y-values that were inputted in the 6x3 table.
I have named the values that are inputted in the table as 'handles.data'. It is currently a 6x3 cell array.
Here is a snip of the code that I get the error message from: handles.xpoints_ip_accept(30,1) = handles.data{1,1}; handles.xpoints_ip_accept(30,2) = handles.data{1,2};
The error that appears is the following:
??? Subscripted assignment dimension mismatch.
Error in ==> acoustic_spec_comparison_tool>plot_but_Callback at 235 handles.xpoints_ip_accept(30,1) = handles.data{1,1}; handles.xpoints_ip_accept(30,2) = handles.data{1,2}
The weird thing is when I try 'handles.data{1,1}' alone I do get a value. Please help
  2 个评论
Walter Roberson
Walter Roberson 2012-6-11
Please check
size(handles.data{1,1})
size(handles.data{1,2})
class(handles.data{1,1})
My first guess would be that the data is stored as strings rather than as numbers.
John
John 2012-6-11
That was exactly the case. Thank you very much!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by