say I fix one of the row indices " ind" .If I try say find(A(ind,:)>0.1) I get the error : "Operation '>' not supported for operands of type table " .In general how do I just go back to some classic matrix from a table ignoring these Variable names?
There's no guarantee you can "slice" the table across rows -- the variables may contain data of different data types.
T = table(LastName, Gender, Age, Smoker);
head(T)
ans =
LastName Gender Age Smoker
____________ __________ ___ ______
{'Smith' } {'Male' } 38 true
{'Johnson' } {'Male' } 43 false
{'Williams'} {'Female'} 38 false
{'Jones' } {'Female'} 40 false
{'Brown' } {'Female'} 49 false
{'Davis' } {'Female'} 46 false
{'Miller' } {'Female'} 33 true
{'Wilson' } {'Male' } 40 false
But if you can, you can use curly braces to extract the data into a numeric array.
A = magic(4)
A =
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
T2 = array2table(A)
T2 =
A1 A2 A3 A4
__ __ __ __
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
Best Answer