Effacer les filtres
Effacer les filtres

Empty deletion bug for cell arrays?

1 vue (au cours des 30 derniers jours)
Jonas Lundgren
Jonas Lundgren le 11 Déc 2019
Modifié(e) : Adam le 11 Déc 2019
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 commentaire
Adam
Adam le 11 Déc 2019
Modifié(e) : Adam le 11 Déc 2019
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

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by