フィルターのクリア

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

2 ビュー (過去 30 日間)
alpedhuez
alpedhuez 2017 年 12 月 27 日
コメント済み: alpedhuez 2018 年 1 月 2 日
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 件のコメント
dpb
dpb 2017 年 12 月 27 日
advise how to proceed.
doc readtable
alpedhuez
alpedhuez 2017 年 12 月 27 日
Yes. mean(Tablename.variable).

サインインしてコメントする。

採用された回答

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 Center および File ExchangeSpreadsheets についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by