Convert Cell Array to Num array
7 次查看(过去 30 天)
显示 更早的评论
Hi, I have a table that I made in GUI, and users will input data into the table. When they prompt the push button I want it to store all of the values entered into an array that I can call for calculations. In the call back i have the following code
t = handles.manualTable;
A = get(t, 'Data')
numArray = cell2mat(get(t, 'Data'))
t gets the data A creates an array but stores each value as 'x' where x is a number. numArray creates an array but it does not allow double-digit numbers because I get the CAT argument dimension error. Any help would be greatly appreciated!! Thanks in advance
Chris
1 个评论
Fangjun Jiang
2011-9-6
Put a break point and debug the code. Before running the 'numArray = cell2mat(get(t, 'Data'))' line, what is the value of A?
采纳的回答
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Cell Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!