Borrar filtros
Borrar filtros

How can I resize the matrix?

1 visualización (últimos 30 días)
Rengin
Rengin el 16 de Feb. de 2015
Respondida: Thorsten el 16 de Feb. de 2015
Hello, Let's say I have the matrix as below:
A= [0 0 0 0 0;0 0 0 0 0;2 3 9 1 7;4 5 6 5 4;0 0 0 0 0] (It can be in different size too)
I want have:
B=[2 3 9 1 7; 4 5 6 5 4] out of A
How can I do that? Thx

Respuesta aceptada

Thorsten
Thorsten el 16 de Feb. de 2015
B = A(sum(A') ~= 0, :)

Más respuestas (0)

Categorías

Más información sobre Resizing and Reshaping 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!

Translated by