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

empty a variable

q
ans=
'4400002970000003533'
'8500000190000013093'
'8500000190000045501'
'8500000840000005660'
'8500000840000006008'
'8500090100000000354'
'8500090100000007316'
'8500090100000009112'
'8500090100000009112'
'8500090100000010547'

Best Answer

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.
Related Question