Borrar filtros
Borrar filtros

malipulating matrices...Cramers Rule help

1 visualización (últimos 30 días)
Nicholas
Nicholas el 24 de Sept. de 2013
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???

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 24 de Sept. de 2013
Editada: Azzi Abdelmalek el 24 de Sept. de 2013
A = [1 3 -8;4 -5 19]
B=fliplr(A(:,2:3))
  2 comentarios
Nicholas
Nicholas el 24 de Sept. de 2013
thanks...do i use the same function to input b in the 2nd column?
Azzi Abdelmalek
Azzi Abdelmalek el 24 de Sept. de 2013
You can just change the order like below
A(:,[3 2]) % b in first column
A(:,[1 3]) % b in second column

Iniciar sesión para comentar.

Categorías

Más información sobre Linear Algebra en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by