For most people familiar with Excel or other table-based spreadsheet software, it's much easier to work with database values in tabular format than in strings of concatenated arrays. MATLAB is a ubiquitous computational platform for statistical analysis and graphical representations of data. When a user isn't familiar with string arrays, using MATLAB to store and process a matrix of values can be tedious and unintuitive. Fortunately, there's an option called "uitable" in MATLAB to view data in a tabular format.
Instructions
- 1
Open MATLAB.
2Type "table1 = uitable" in the command window. This names a user-interface table "table1."
3Add some data to the table by setting some values using the set command. To do this, type "set(table1,'Data',magic(10))" in the command window and the values in the table will be given magic square table values for 10 rows and 10 columns.
4Type "set(table1,'ColumnWidth',25)" in the command window and the column widths will become smaller. You can add any data you prefer; magic(10) is just an example. Column names, row names, data and many other parameters can be defined or changed by using MATLAB-specific uitable property codes, listed on the MATLAB MathWorks website.
0 comments:
Post a Comment