how to find and replace corresponding matri
2 次查看(过去 30 天)
显示 更早的评论
a1{:}
ans =
73.3333 50.0000
66.6667 50.0000
ans =
Empty matrix: 0-by-2
ans =
Empty matrix: 0-by-2
ans =
Empty matrix: 0-by-2
ans =
Empty matrix: 0-by-2
ans =
Empty matrix: 0-by-2
i need to find index for non zero cell array, and convert in into mat.
0 个评论
回答(3 个)
Azzi Abdelmalek
2016-5-19
编辑:Azzi Abdelmalek
2016-5-19
idx=celfun(@isempty,a1)
a1(idx)=[]
out=cell2mat(a1)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!