How to extract month-wise data from a single column?

2 ビュー (過去 30 日間)
Rahul Verma
Rahul Verma 2023 年 6 月 2 日
編集済み: Dyuman Joshi 2023 年 6 月 7 日
I have an excel file, containing monthly data of several years in one single column. Now i have to extract the data for perticular month (say February month from all the years). I want to write a code which can extract the data in aforementioned manner.
I have attached the excel file for better understanding. Descroption of data: The excel file contains the data values in single column. There are total 904 rows (indicating 904 months).
Now i want to extract the February month data from all the years. How can i do it?
I have attached the data file in excel format.

採用された回答

Dyuman Joshi
Dyuman Joshi 2023 年 6 月 2 日
編集済み: Dyuman Joshi 2023 年 6 月 7 日
Read the excel file via readmatrix and use indexing to get the data for February.
Make sure that the excel is present in the current directory and MATLAB has access to it.
file = readmatrix('Wind1948to2023.xlsx');
FebData = file(2:12:end)
  1 件のコメント
Rahul Verma
Rahul Verma 2023 年 6 月 5 日
Thanks. This is very helpful.

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

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