Read a spreadsheet and calculate statistics of each variable in the spreadsheet
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
alpedhuez
el 27 de Dic. de 2017
Comentada: alpedhuez
el 2 de En. de 2018
I have a spreadsheet data with the header (variable name).
I would like to:
1. Read the spreadsheet using Import Wizard. 2. Assign variable name to each column. 3 Calculate summary statistics of each column.
Please advise how to proceed.
2 comentarios
Respuesta aceptada
Tristan Yang
el 2 de En. de 2018
1. Read the spreadsheet using Import Wizard: Please use the 'Import Data' in the tool strip. Choose the spreadsheet you want to import, select the range, and import it as a 'table' type. This will create a variable with the spreadsheet file name that represents the table in MATLAB worksplace.
2. Assign variable name to each column: You can assess each column as an array with the variable names (header name). For example, if the table (named table1) has a column name 'age', then: >> table1.age would return all the ages of the rows.
3. Calculate summary statistics of each column: Please consider using the 'summary' function for 'table' type in MATLAB. Please refer to the following documentation page: https://www.mathworks.com/help/matlab/matlab_prog/calculations-on-tables.html
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!