Superimposing one matrix on another
Ältere Kommentare anzeigen
m =
120 0 0 0 100
120 0 0 0 100
120 0 0 0 100
120 0 0 0 100
120 0 0 0 100
120 0 0 0 100
m1 =
85 100 170
85 170 100
100 85 170
100 170 85
170 100 85
170 85 100
Let's say I have these 2 matices. I want to create m2 from m and m1:
m2 =
120 85 100 170 100
120 85 170 100 100
120 100 85 170 100
120 100 170 85 100
120 170 100 85 100
120 170 85 100 100
How would I go about doing this?
Akzeptierte Antwort
Weitere Antworten (1)
the cyclist
am 24 Okt. 2011
One of a few possible ways:
m2 = m;
m2(:,2:4) = m2(:,2:4) + m1;
1 Kommentar
Will
am 24 Okt. 2011
Kategorien
Mehr zu Dynamic System Models 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!