Multiply only certain columns in a matrix with a constant
이전 댓글 표시
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!
채택된 답변
추가 답변 (1개)
dpb
2022년 7월 28일
M(:,end-5:end)=c*M(:,end-5:end);
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!