how to separate the figures of specific number using matlab ?
2 views (last 30 days)
How to separate the figures of specific number and then making a new vector which will include the figures that have been separated separately ?? for example : if i have a number as (123456789) , what is the function or command that will separate these figures of the number so that they look like this form 1 2 3 4 5 6 7 8 9 Meaning that will turn into a vector
Image Analyst on 12 Jun 2014
n = 123456789;
% Convert to a string.
strn = num2str(n)
% Initialize with all spaces.
output = char(32*ones(1,2*length(strn)))
% Make every other character the digits from the number.
output(1:2:end) = strn