Multiplying columns in a martrix by different values

Hello Matlab community,
I have a matrix A that is 2232X2 double. I am attempting to multiply the first column by 1E6 and the second by 1E9. I tried doing the following X = A(:,1).*1E6 , A(:,2).*1E9, but that does not seem to work. I need the output to be a matrix of 2232X2. Thank you!
Eric

 채택된 답변

David Goodmanson
David Goodmanson 2017년 6월 9일

0 개 추천

Hi Eric,
A(:,1) = A(:,1)*1e6
and similarly for the other one.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by