function a=num2p(n) strr=num2str(n); index=size(strr); indexx=index(2); a=[]; for k=indexx-1:-1:0 a=[a rem(fix(n/(10^k)),10)]; end