how to do matrix addition of different sizes

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 13 Jun. 2013

0 Stimmen

C=A
C(:,1:3)=A(:,1:3)+B(:,1:3)

3 Kommentare

krishnamurthy
krishnamurthy am 13 Jun. 2013
How to Calculate E
lambda=rand(1);
h-rand(1,12);
a=rand(1,12);
d=rand(1,12);
B=rand(12,3);
E=[(diag(a+(h.*d))./lambda)]+B;
sorry actually
h=rand(1,12)
E1=diag(a+(h.*d))
E2=lambda+B;
E=E1
E(:,1:3)=E1(:,1:3)./E2(:,1:3)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Language Fundamentals finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by