I have the following function
function c = nice(n)c = nwhile c ~= 1if rem(c,2) == 0 c = c/2else c = 3*c+1endend
and I am trying to insert all the c values into one vector. Any hints on how can I do it?
MATLABvectorwhile loop data
function c = nice(n)c = nwhile c ~= 1if rem(c,2) == 0 c = c/2else c = 3*c+1endend
Best Answer