importing and calculation from excel to matlab

3 ビュー (過去 30 日間)
sri satya ravi
sri satya ravi 2016 年 4 月 12 日
編集済み: Walter Roberson 2016 年 4 月 13 日
I am looking to import data from excel with colum names. I also meed to perform calculations for the whole column with that name.
For Example: Say i have a excel sheet with 50 columns of data. I want to pick a column from the dataset with the name of the column and do some mathematical operations on the whole column.
I am attaching an image of the data-set and the matlab function
i am working on and having an issue. Please let me know if there is a way to do those kind of calculations

採用された回答

Stalin Samuel
Stalin Samuel 2016 年 4 月 12 日
you cannot use the column title directly.You have to use the index something like "Rawdata(16:end,3)".Which states that in Rawdata table 3rd column is "CO2_meas" and data is filled from the column no 16 .It is better if you attach the imported Rawdata file.So that more accurately we can specify the code.
  2 件のコメント
sri satya ravi
sri satya ravi 2016 年 4 月 12 日
Hi, I am attaching the rawdata excel file.....please have a look and let me know
Stalin Samuel
Stalin Samuel 2016 年 4 月 13 日
filename = 'MAE 525 HW5 Soln.xlsx';
sheet = 1;
xlRange = 'C17:C12006';
CO2_meas = xlsread(filename,sheet,xlRange);
xlRange1 = 'D17:D12006';
CO_meas = xlsread(filename,sheet,xlRange1);
X = CO2_meas.*CO_meas;

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

その他の回答 (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