Problem 341. count to vector
Return a matrix of numbers of dimension K by N, where K = prod(v), and N=length(v). The rows count from a vector of ones up to v, where the nth element of a row can take on the values 1:v(n).
Solution Stats
Problem Comments
-
2 Comments
Alfonso Nieto-Castanon
on 19 Feb 2012
the text does not specify the expected order of the rows
David Young
on 8 Mar 2012
It would be helpful if the text gave an example. Also, the test suite should be much richer - only two special cases does not really encourage people to write general solutions.
Solution Comments
Show commentsProblem Recent Solvers90
Suggested Problems
-
Replace NaNs with the number that appears to its left in the row.
3049 Solvers
-
Reverse the Words (not letters) of a String
467 Solvers
-
Return elements unique to either input
800 Solvers
-
299 Solvers
-
212 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!