MATLAB: I need to rewrite numbers of variable to vector.

rewriting numbers vairable vector

Example: Change a = 12345 to b = [1,2,3,4,5]. Does anyone know is it possible? and if yes.. how to to this by using Matlab`s syntax?

Best Answer

b = num2str(a) - '0';