필터 지우기
필터 지우기

How to calculate in a matrix

조회 수: 1 (최근 30일)
min wong
min wong 2016년 11월 29일
댓글: Laith Mohammed 2019년 11월 21일
If I had a matrix A=[12 3 65,2 3 6,68 15 40]
I want to change second array of matrix A multiply 10
will be like A=[12 3 65,20 30 60,68 15 40]
How can I do ?
Thank you

채택된 답변

KSSV
KSSV 2016년 11월 29일
A=[12 3 65 ;2 3 6 ;68 15 40] ;
iwant = A ;
iwant(:,2) = 10*iwant(:,2) ;
Read about matrix indexing......
  댓글 수: 2
min wong
min wong 2016년 11월 30일
thank you
Laith Mohammed
Laith Mohammed 2019년 11월 21일
Good answer just reverse iwant(2,:) = 10*iwant(2,:)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by