I want to empty a variable q, i used q={} or q=[ ],but why it doesn't work , thank you

조회 수: 1 (최근 30일)
q
ans=
'4400002970000003533'
'8500000190000013093'
'8500000190000045501'
'8500000840000005660'
'8500000840000006008'
'8500090100000000354'
'8500090100000007316'
'8500090100000009112'
'8500090100000009112'
'8500090100000010547'
  댓글 수: 1
Stephen23
Stephen23 2014년 10월 6일
You don't show us what you are doing, and expect us to tell you why it doesn't work. Please provide the full code you are trying to run.

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

채택된 답변

Adam
Adam 2014년 10월 6일
q = cell.empty;
will give you an empty cell array if that is what you want. I don't know what you whole code looks like, but this should keep it in the correct type for next time round the loop I think.

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 10월 6일
편집: Azzi Abdelmalek 2014년 10월 6일
q={ '4400002970000003533' '8500000190000013093' '8500000190000045501' '8500000840000005660' '8500000840000006008' '8500090100000000354' '8500090100000007316' '8500090100000009112' '8500090100000009112' '8500090100000010547'}'
q=[]
  댓글 수: 1
pengcheng
pengcheng 2014년 10월 6일
in the end of every loop, i want to empty q, but i doesn't work if q=[]; The following error occurred converting from cell to double: Error using double Conversion to double from cell is not possible.

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

카테고리

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