Problem 45970. Vector of digits (★★)
Given a positive integer x, construct a vector y with all the digits of x in the order of appearance in x. Thus, if
x = 172850
then
y = [ 1 7 2 8 5 0];
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers58
Suggested Problems
-
Swap the first and last columns
19825 Solvers
-
The sum of the numbers in the vector
588 Solvers
-
Switch matrix to a column vector
345 Solvers
-
609 Solvers
-
Flip the vector from right to left
8653 Solvers
More from this Author52
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!