Created
January 7, 2015 12:27
-
-
Save wyudong/7d896b4daf8bf5c5b4fc to your computer and use it in GitHub Desktop.
MATLAB - Get digital values of a number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num = '123456789'; | |
str = num2str(num); | |
val = str - '0'; % val = [1,2,3,4,5,6,7,8,9] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment