Empty deletion bug for cell arrays?

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개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

질문:

2019년 12월 11일

편집:

2019년 12월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by