필터 지우기
필터 지우기

Divide a specific element in a matrix

조회 수: 1 (최근 30일)
Tran Thien
Tran Thien 2019년 5월 8일
댓글: Tran Thien 2019년 5월 8일
For example I have:
A=[1 2 3; 3 2 4; 5 4 1]
And I want it like this:
A=[1 -2 -3; -3 2 -4; -5 -4 1]
As you can see i'm trying to divide A12 A13 A21 A23 A31 A32 by -1, how can I do it?
Thank you
  댓글 수: 2
James Tursa
James Tursa 2019년 5월 8일
From your description, wouldn't the result be this instead?
A = [1 -2 -3; -3 2 -4; -5 -4 1]
If not, then what is the rule?
Tran Thien
Tran Thien 2019년 5월 8일
Yes it is, sorry i'll edit it :D

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

채택된 답변

Fangjun Jiang
Fangjun Jiang 2019년 5월 8일
A.*(2*eye(3)-1)

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by