how to replace the element in matrix?

i have a matrix
if true
A = [ 1 5 9 7
3 5 7 8
8 2 4 6 ];
end
now i want to put number 12 in the location of A(2,2)
also i want to put number 13 in the location of A(3,3)
how can i do please help me

 채택된 답변

Yao Li
Yao Li 2013년 5월 16일

14 개 추천

A(2,2)=12;
A(3,3)=13;

댓글 수: 2

deniz yükçeken
deniz yükçeken 2021년 3월 19일
how can i do it with a column
Burak Ahmet Celebi
Burak Ahmet Celebi 2021년 3월 31일
A(:,2)=12;
A(:,3)=13;
A = [ 1 12 13 7
3 12 13 8
8 12 13 6 ];

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

제품

질문:

win
2013년 5월 16일

댓글:

2021년 3월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by