Addition of two different sized arrays

조회 수: 1 (최근 30일)
Baris Demir
Baris Demir 2022년 5월 19일
댓글: KSSV 2022년 5월 19일
I have different sized arrays. First one is sized I=4000x4000, and the other ones are V1,V2=2000x2000. I want to sum them up. But I am having an error because their sizes are different. So I use;
RN=I+[V1;zeros(2000,2000)]/sqrt(6)+[V2;zeros(2000,2000)]/sqrt(2);
to make them equal size. But, I keep getting the same error wich;
Arrays have incompatible sizes for this operation.
And I want to make this operations in original;
RN=I+V1/sqrt(6)+V2/sqrt(2);
GN=I+V1/sqrt(6)-V2/sqrt(2);
BN=I-2*V1/sqrt(6);
How can I make these calculation?

채택된 답변

KSSV
KSSV 2022년 5월 19일
You may resize them to same size using imresize.
  댓글 수: 2
Baris Demir
Baris Demir 2022년 5월 19일
Thanks. It woked.
KSSV
KSSV 2022년 5월 19일
Thanks is accepting the asnwer. :)

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by