필터 지우기
필터 지우기

Compare matrices with datenum

조회 수: 2 (최근 30일)
David du Preez
David du Preez 2017년 5월 19일
편집: Andrei Bobrov 2017년 5월 19일
Hi. I have 2 matrices. The first matrix A, (12x1) contains the monthly average values over 10 years. Row 1 is January, row 2 is February and so on. The second matrix B, is 8760x15. In column one there are hourly datenum values for an entire year and in column 15 there daily values. One value has been assigned for an entire day in column 15.
I want to remove an entire day if its value in column 15 is less than the corresponding monthly value in matrix A.
  댓글 수: 2
Andrei Bobrov
Andrei Bobrov 2017년 5월 19일
Please attach B - matrix here.
David du Preez
David du Preez 2017년 5월 19일
Here is the correct B. It is just a sample of the matrix. Only has the 2 columns that relate to this question

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

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2017년 5월 19일
편집: Andrei Bobrov 2017년 5월 19일
out = B(A(month(B(:,1))) <= B(:,end),:);

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by