Suppose you have a table T. You can save a row from this table into a cell array C using the following code:
main.m24 chars2 lines
This will save the first row of table T into a cell array C. You can replace the 1 with any row number you want to save. Also, note that the table2cell function is used to convert the table row into a cell array.
If you want to save multiple rows from the table into a cell array, you can use a loop:
main.m87 chars6 lines
This will save the first 5 rows of table T into a cell array C, with each row being saved in a separate cell. Change the value of numRows to save any number of rows you want.
gistlibby LogSnag