basic introduction to table in MatLab
basic introduction to table in MatLab
[introduction]
What is table?
A table is a kind of array in tubular form whose name is it column and it can contain elements with different types.
How to create a table?
keyword table.
Type Conversion.
Remember that t1->t2 will be represented as <t1>2<t2>
array2table
homogenous array to table.
cell2table
cell array to table.
struct2table
structure array to table
timetable2table
timetable to table.
table2array
table to homogeneous array.
table2cell
table to cell array.
table2struct
table to structure array.
table2timetable
table to timetable.
How to subscript the type?
keyword vartype.
[syntax]
V=vartype(<type>)
V will present as <type>
e.g.
S = vartype('numeric');
T2 = T(:,S)T will converted as numeric type then assign it to the variable T2.
How to convert table to a specified type?
keyword convertvars
or
keyword that I mentioned above.
[syntax]
will convert the specified elements var in T1 into the specified type dataType. Then assign the result to T2.
Type of T2 is dataType.
I will talk more about table and timetable in future since it has lots of things to learning and talk.
more details on:
Tables - MATLAB & Simulink (mathworks.com)
Comments
Post a Comment