pick up elements from a cell array and the result must be a cell array
显示 更早的评论
I want to pick up all elements of a cell array except the last element. When I do V{1:end-1}, the result seems not to be a cell array.
采纳的回答
更多回答(1 个)
madhan ravi
2019-8-14
cellfun(@(x) reshape(x(1:end-1),[],1), V,'un',0)
类别
在 帮助中心 和 File Exchange 中查找有关 Software Development Tools 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!