I don't want the number to turn a scalar into an array eg x = 1994 = 1 9 9 4 I want it the scalar x = 1994 to split into multiple scalars. I hope this makes sense and your help will be much appreciated
MATLAB: Hi guys. I need help splitting a number into its individual parts and then add them. E.g. the number would be 1994 = 1 + 9 + 9 + 4 = 23
splitting numbers
Related Question
- Extracting a specific digit from a float w/o floating-point implementation rounding issues
- Converting number to date number
- I want to store the digits after the decimal point of the numbers stored in an array. How to do it
- Sum down to one digit
- How to obtain the unique combinations of two columns in a table
Best Answer