malipulating matrices...Cramers Rule help

i have a matrix A = [1 3 -8;4 -5 19]
and i have b = A(:,3), which gives b = [-8;19]
for cramers rule i now need to replace the 1st column of A with the column matrix b and only give me a 2x2 matrix disregarding the 3rd column, my result needs to be...
A = [-8 3;19 -5] how do i do this???

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 9월 24일
편집: Azzi Abdelmalek 2013년 9월 24일

0 개 추천

A = [1 3 -8;4 -5 19]
B=fliplr(A(:,2:3))

댓글 수: 2

Nicholas
Nicholas 2013년 9월 24일
thanks...do i use the same function to input b in the 2nd column?
You can just change the order like below
A(:,[3 2]) % b in first column
A(:,[1 3]) % b in second column

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

카테고리

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

질문:

2013년 9월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by