Remove numbers from a cell array of length n = 10963

1 次查看(过去 30 天)
As I can remove numbers from a cell array?
I have a cell of 10693 rows and 1 column. Each of these rows contains another array containing numbers and I want to delete the numbers (-1). As I can do that with a loop? thank you very much

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-12-11
编辑:Azzi Abdelmalek 2013-12-11
If A is your array
A={1:3 -1:5}
out=cellfun(@(x) x(x~=-1), A,'un',0)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by