필터 지우기
필터 지우기

how to make two differnt size array into same

조회 수: 5 (최근 30일)
Kafayat Olayinka
Kafayat Olayinka 2019년 4월 18일
댓글: Kafayat Olayinka 2019년 4월 19일
I have arrays:
T1=(5160 by 1); Temp=(5160 by 1);
T2=(6100 by 1); RH=(6100 by 1);
I will like to plot these together. But first I synced T1 and T2 using:
T3=intersect(T1,T2); so T3=(3600 by 1).
How can I get Temp and RH for every T3?
How can I make Temp=(3600 by 1) and RH=(3600 by 1)?
so that I can plot yyaxis of RH and Temp with xais=T3?

채택된 답변

Walter Roberson
Walter Roberson 2019년 4월 18일
[T3, ia, ib] = intersect(T1, T2);
T3Temp = Temp(ia);
T3RH = RH(ib);
yyaxis left
plot(T3, T3RH);
yyaxis right
plot(T3, R3Temp);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by