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

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일

0 개 추천

A.*(2*eye(3)-1)

추가 답변 (0개)

카테고리

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

제품

태그

질문:

2019년 5월 8일

댓글:

2019년 5월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by