partially reduced row echelon form
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Christoph Neumann
el 20 de Ag. de 2020
Comentada: Christoph Neumann
el 1 de Sept. de 2020
Suppose a
matrix C and a
matrix D. I want to bring the matrix
into the form:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/349166/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/349169/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/349172/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/349175/image.jpeg)
where
is in reduced row echelon form. Currently, I do this using the following code:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/349178/image.png)
%Our aim is to bring the matrix (C,D) in the form
% [Ctilde, Dtilde_1]
% [0-rows , Dtilde_2].
[CtildeT,BVCtilde] = rref([C,speye(q)]);
%Delete Zero Rows in Ctilde
CtildeWZ = CtildeT(:,1:n);
Ctilde = CtildeWZ(any(CtildeWZ~=0,2),:);
T = CtildeT(:,n+1:end);
Dtilde = T*D;
Dtilde_1 = Dtilde(any(CtildeWZ~=0,2),:);
Dtilde_2 = Dtilde(all(CtildeWZ==0,2),:);
the rref function turns out to be a bottleneck for large matrices C. Is there another potentially faster way do compute these matrices?
0 comentarios
Respuesta aceptada
Athul Prakash
el 1 de Sept. de 2020
Hey Christoph,
You may try using the 'fast rref' function created on File Exchange by Armin Ataei. It may perform faster than Matlab's rref.
Note: Code that is shared on MATLAB File Exchange is written by MATLAB users and is not developed or tested by the Mathworks.
Más respuestas (0)
Ver también
Categorías
Más información sobre Linear Algebra en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!