Deleting cell arrays.

4 views (last 30 days)
Gian Carpinelli
Gian Carpinelli on 12 Apr 2018
Edited: per isakson on 12 Apr 2018
Hey so I've been trying to delete cells from an array but I haven't been able to produce the result. If I have something similar to: 4×1 cell array [2] [0] [1] [3]
is there a way to completely delete cells from this array?

Answers (1)

per isakson
per isakson on 12 Apr 2018
Edited: per isakson on 12 Apr 2018
"is there a way to completely delete cells from this array?" Hint:
>> cac={ [2] [0] [1] [3] }
cac =
[2] [0] [1] [3]
>> cac(3)=[]
cac =
[2] [0] [3]
and plural
>> cac={ [2] [0] [1] [3] }
cac =
[2] [0] [1] [3]
>> cac([1,3])=[]
cac =
[0] [3]

Community Treasure Hunt

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

Start Hunting!