Deleting cell arrays.

1 次查看(过去 30 天)
Gian Carpinelli
Gian Carpinelli 2018-4-12
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?

回答(1 个)

per isakson
per isakson 2018-4-12
编辑:per isakson 2018-4-12
"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]

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by