Undefined operator '~=' for input arguments of type 'cell'.?

조회 수: 1 (최근 30일)
Mira le
Mira le 2019년 12월 9일
답변: Jakob B. Nielsen 2019년 12월 9일
W is cell
contains cell values
in iteration the size of W is reduced by removing cell, and in each time check W is empty , how can I do that in matlab
W =
1×2 cell array
[1×2 double] [1×2 double]
>> W{1}
ans =
1 2
>> W{2}
ans =
2 3
  댓글 수: 1
Philippe Lebel
Philippe Lebel 2019년 12월 9일
The question seems not to be linked to the description. Could you provide a code example of the problem you encounter?

댓글을 달려면 로그인하십시오.

채택된 답변

Jakob B. Nielsen
Jakob B. Nielsen 2019년 12월 9일
If you want to check that a cell array is empty, simply use isempty(W), which will yield 0 as long as you still have values left in W, and 1 once the final cell is removed.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by