Can Matlab row reduce this matrix?

6 visualizaciones (últimos 30 días)
Harel Harel Shattenstein
Harel Harel Shattenstein el 9 de En. de 2018
Comentada: Alexander Guillen el 2 de Mzo. de 2018
Can we row reduce the following matrix?
  4 comentarios
Harel Harel Shattenstein
Harel Harel Shattenstein el 9 de En. de 2018
It is not homework, I just do not know how to use x,y,z,w in matlab
Alexander Guillen
Alexander Guillen el 2 de Mzo. de 2018
Wow, people here so f rude.English is not my first language and I can understand what this person is looking for. I am not sure if this a professional website you can ask questions. It looks like there are just over entitled, self absorbed computer geniuses. As.holes.

Iniciar sesión para comentar.

Respuestas (2)

John D'Errico
John D'Errico el 11 de En. de 2018
I'm not positive what you are looking for.
Make x,y,z,w symbolic variables.
syms x y z w
Now, construct your array, and do row operations on that array.
What you are not saying is what is the purpose of this task? Thus, given the array:
A = [2 -3 3 2;-2 3 -1 -1;0 3 1 2; 2 3 3 5]
A =
2 -3 3 2
-2 3 -1 -1
0 3 1 2
2 3 3 5
Then this does row reduce the combined matrix.
rref([A,[x;y;z;w]])
ans =
[ 1, 0, 0, 1, 0]
[ 0, 1, 0, 1/2, 0]
[ 0, 0, 1, 1/2, 0]
[ 0, 0, 0, 0, 1]
A clearly has rank 3. We can see that from the above computation, that there is some vector that does not lie in the row space of A. Of course, rref does not give you the linear combination of the rows that yielded that 1 in the bottom right corner. I think perhaps that is what you are looking to find. You wanted that last column to remain expressed as symbolic variables.
So, can we recover the row operations that were applied to A? A and rref(A) occupy the same row space. And while rref =does not return the actual row operations, they can be recovered.
format rat
K = rref(A)*pinv(A)
K =
-1/2 -2/3 -1/6 1/3
-1/6 -1/36 1/18 5/36
1/2 5/12 1/6 -1/12
0 0 0 0
K*A
ans =
1 * * 1
* 1 * 1/2
* * 1 1/2
0 0 0 0
The * elements are all essentially zeros, just tiny trash. As you can see, the result is essentially the same row operations that were applied to A to get rref(A).
We can now apply those same row operations to [x;y;z;w].
K*[x;y;z;w]
ans =
w/3 - x/2 - (2*y)/3 - z/6
(5*w)/36 - x/6 - y/36 + z/18
x/2 - w/12 + (5*y)/12 + z/6
0
But remember that K has rank 3, reflecting the rank of A. We can find a row that is not representable as a linear combination of the rows of A.
null(A,'r')'
ans =
-1 -1/2 -1/2 1
null(A,'r')'*[x;y;z;w]
ans =
w - x - y/2 - z/2
And I still have no idea exactly what you want.

Torsten
Torsten el 9 de En. de 2018
https://de.mathworks.com/help/symbolic/rref.html
Best wishes
Torsten.
  2 comentarios
Harel Harel Shattenstein
Harel Harel Shattenstein el 9 de En. de 2018
Entered
rref([2 -3 3 2 x;-2 3 -1 -1 y;0 3 1 2 z; 2 3 3 5 w])
% code
end
and got
[ 1, 0, 0, 1, 0]
[ 0, 1, 0, 1/2, 0]
[ 0, 0, 1, 1/2, 0]
[ 0, 0, 0, 0, 1]
% code
end
Where are the variables?
Torsten
Torsten el 10 de En. de 2018
Editada: Torsten el 10 de En. de 2018
https://stackoverflow.com/questions/14449255/reduced-row-echelon-of-a-matrix-containing-unknown-constants-in-matlab
Additionally, you may want to check this link:
Best wishes
Torsten.

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by