How to delect the zero values in table
显示 更早的评论

There is a table in matlab, I want to know how to delete the entire row with zero values?
Many thanks in advance.
采纳的回答
更多回答(1 个)
Fangjun Jiang
2021-5-24
编辑:Fangjun Jiang
2021-5-24
a=[1 2 3;0 0 0 ; 1 0 2];
index=all(a==0,2);
a(index,:)=[];
类别
在 帮助中心 和 File Exchange 中查找有关 Tables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!