MATLAB: Access position of a number

access number

Is it possible to access the position of a number if it isn't a vector? for example
if true
A=12345
if (A(firstNumber)==1)
disp('Text')
end

Best Answer

You can convert the number to string using num2str and access the number.
A = 12345 ;
B = num2str(A) ;
B(1)