Identify & Removing Linear Dependent row/s
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ethan Maxey
el 13 de Feb. de 2022
Comentada: Ethan Maxey
el 13 de Feb. de 2022
How can I print this matrix so that it finds and prints on the screen a column of the matrix that can be deleted so that the remaining columns still span R4?
Matrix = [10,-7,1,4,6;-8,4,-6,-10,-3;-7,11,-5,-1,-8;3,-1,10,12,12]
A=[10,-7,1,4,6;-8,4,-6,-10,-3;-7,11,-5,-1,-8;3,-1,10,12,12];
%rref(A) I'm not sure how this rref would work but I know I would need an if conditional.
I can't figure out how to remove the specific column based on if it is linearly dependent/independent.
3 comentarios
Image Analyst
el 13 de Feb. de 2022
Which column do you want to delete? Just do
Matrix(:, 4) = []; % Delete column 4.
What do you mean by "still span R4"? For this 2-D Matrix, what is R4? What is your expected output?
Respuesta aceptada
Voss
el 13 de Feb. de 2022
How about this?
Matrix = [10,-7,1,4,6;-8,4,-6,-10,-3;-7,11,-5,-1,-8;3,-1,10,12,12]
[~,p] = rref(Matrix)
removed_column_idx = setdiff(1:size(Matrix,2),p)
removed_columns = Matrix(:,removed_column_idx)
reduced_Matrix = Matrix(:,p)
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices 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!