MATLAB: Table2array gives string array when contents are numbers

MATLABtable2arraytable2array string array instead of double

Whenever I try to convert an table of numbers into an array, instead I will get a string array with all my numbers listed inside quotemarks. When I try to access it with {} which is reccommended elsewhere in matlab answers then the problematic column that I just added to the matrix here just dissapears entirely
The line giving the issue is
channel5mmyeild= table2array([sr_p, x5mmlinyeild]);
Anyone have any idea what could be causing this?
Cheers

Best Answer

I suspect data in sr_p and x5mmlinyeild are chars or strings and not doubles. What is the data type of the columns of your table? Look at the results of summary(sr_p) and summary(x5mmlinyeild).
If that doesn't seem to be the problem, please save your variables to a mat file and attach them to your post using the paperclip icon.