How do I vectorize each digit of an integer and store it as an array?
51 views (last 30 days)
I have to convert an integer into a vector of all its digits. Example: 100---> [1 0 0]
function ans = int2vec(x)
Though this worked for me, is there a better solution.