如何排除MatLab表中的空行?

如何排除MatLab表中的空行?,matlab,null,row,Matlab,Null,Row,我有一个包含m行和n列的矩阵,其中prows(p可用于此目的,如下所示: A = A(any(A,2),:); % any(A,2) gives the logical indices of the rows whose at least one element is non-zero 参考副本,但操作转置。 A = A(any(A,2),:); % any(A,2) gives the logical indices of the rows whose at least one elemen

我有一个包含m行和n列的矩阵,其中
p
rows
(p可用于此目的,如下所示:

A = A(any(A,2),:);
% any(A,2) gives the logical indices of the rows whose at least one element is non-zero

参考副本,但操作转置。
A = A(any(A,2),:);
% any(A,2) gives the logical indices of the rows whose at least one element is non-zero