dimanche 7 décembre 2014

Error while deleting cell array elements in matlab


Vote count:

0




I have following 1-D cell array:


obj = 'HotAirBalloon' 'Cloud' 'Sun' 'Lightning'


I trying to delete its elements using a 'for' loop in the following manner:


for i = 1:4


obj (i) = [ ];


end


But, I am getting error -> Index of element to remove exceeds matrix dimensions, and following elements remain in the 'obj' array: 'Cloud' 'Lightning'


If I repeat the operation (for loop), then the elements get deleted.


What's the problem ?



asked 22 secs ago







Error while deleting cell array elements in matlab

Aucun commentaire:

Enregistrer un commentaire