MATLAB: How to identify each digit of a number

digiteach digitidentify

Is there some way to identify each digit of a number? example: number 1001, digit one=1, digit two=0,digit three=0, digit four=1. i appreciate the help thanks

Best Answer

Try this trick:
number = 1001
digits = num2str(number) - '0'