Display first columns and rows of a table
30 views (last 30 days)
Function head displays "Get top rows of table, timetable, or tall array."
The example has "Create a table that contains 100 rows and five variables."
But my table has 100 variables (say). In this case head does not disply the output cleanly (in Jupyter).
Is there any function to display the top rows and *columns* of table? Or any other workaround?
Cris LaPierre on 18 Aug 2021
The head function is just a helper function. Under the hood, it is just using indexing. Ch 5 of MATLAB Onramp will introduce you to the fundamentals of indexing in MATLAB. Once you understand that, you can use indexing to create your own customized display of a table.
Tables are a little nuanced, so read through the Access Data in Tables page to understand how to use indexing with tables.