Remove numbers from a cell array of length n = 10963

1 Ansicht (letzte 30 Tage)
FRANCISCO
FRANCISCO am 11 Dez. 2013
Kommentiert: FRANCISCO am 11 Dez. 2013
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

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by