Empty deletion bug for cell arrays?

1 次查看(过去 30 天)
Jonas Lundgren
Jonas Lundgren 2019-12-11
编辑: Adam 2019-12-11
These code lines are okay in MATLAB R2017a:
x = {[]};
x{1}([]) = [];
But the following give an error ("Deletion requires an existing variable."):
x = cell(1);
x{1}([]) = [];
Can anyone tell me the difference?
Regards Jonas
  1 个评论
Adam
Adam 2019-12-11
编辑:Adam 2019-12-11
Strange. It's odd syntax in the first place, but when I put both those in R2019b, naming the second one as y I get the same error as you, for the 2nd one only, but also:
>> isequal( x, y )
ans =
logical
1

请先登录,再进行评论。

回答(0 个)

类别

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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by