Multiply only certain columns in a matrix with a constant
Ältere Kommentare anzeigen
Hello,
I have a 100x9 matrix M, whose last six columns should be multiplied by a constant c and the first three columns shall remain unchanged. What would be an appropriate way to achieve this?
Thank you very much for your help!
Akzeptierte Antwort
Weitere Antworten (1)
dpb
am 28 Jul. 2022
M(:,end-5:end)=c*M(:,end-5:end);
Kategorien
Mehr zu Logical 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!