필터 지우기
필터 지우기

How to extract sub matrix from the main matrix?

조회 수: 3 (최근 30일)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2019년 3월 8일
댓글: MAHMOUD ALZIOUD 2019년 3월 12일
Dear All, I have a numerical matrix of three columns, (Year, Month and Day), but each days does not have the same number of rows as another day, how can I tell MATLAB please to extract a matrix from the main one based on the 2nd & 3rd column value? for example I attached the file, what is the code to extract the matrix from 1/1/2010 to 2/3/2010? please see the excel file
  댓글 수: 2
Andrei Bobrov
Andrei Bobrov 2019년 3월 8일
Question.xlsx - empty file.
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2019년 3월 8일
here it is

댓글을 달려면 로그인하십시오.

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 3월 9일
편집: madhan ravi 2019년 3월 9일
What I have found that there is no data as 2/3/2010.
Suppose I take as example your exel file having
Row 1: 10 1 1
...
..
Row 46: 10 2 4
Supose you want access the some portion of the excel file (2,2) to (10,3)-Submatrix includes the elements having inbetween,
it goes this way
filename='Question.xlsx';
data=xlsread(filename);
Data=data(2:10,2:3)
Output:
Data =
1 1
1 1
1 1
1 1
1 1
1 2
1 2
1 2
1 2
  댓글 수: 1
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2019년 3월 12일
this can be done if i have small datab but actully i have 1.2 million rows of data and i cannot do this manually

댓글을 달려면 로그인하십시오.

카테고리

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