필터 지우기
필터 지우기

Read a spreadsheet and calculate statistics of each variable in the spreadsheet

조회 수: 2 (최근 30일)
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.

채택된 답변

Tristan Yang
Tristan Yang 2018년 1월 2일
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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by