MATLAB: Num2str error

I am using 2014b, and a script was written on 2011b. The error is pretty random since it is a mathworks code I am getting.
Error in num2str (line 66) xmax = double(max(abs(widthCopy(:))));
Not sure what to do!

Best Answer

You get this error if you try to use num2str with a cell format
s={'123'}
out=num2str(s)
s should be a number
s=123
out=num2str(s)
or a string
s='123'
out=num2str(s)
Related Question