how to do matrix addition of different sizes
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
E = diag([12:4:56])
B=rand(12,3)
C=A+B
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 13 Jun. 2013
C=A
C(:,1:3)=A(:,1:3)+B(:,1:3)
3 Kommentare
Azzi Abdelmalek
am 13 Jun. 2013
E1=diag(a+(h.*d))
E2=lambda+B;
E=E1
E(:,1:3)=E1(:,1:3)./E2(:,1:3)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!