We'd like to create histogram data, which first column shows the data, and second column shows the frequency.
input = [1, 2, 1, 1, 2, 3, 4, 1];
output = [1, 4; 2, 2; 3, 1; 4, 1];
Actually, useful matlab function exists to solve. Please try to solve it with and without the useful matlab function.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers23
Suggested Problems
-
Back to basics 9 - Indexed References
463 Solvers
-
Arrange vector in ascending order
819 Solvers
-
Construct an index vector from two input vectors in vectorized fashion
460 Solvers
-
Magic is simple (for beginners)
11533 Solvers
-
The Answer to Life, the Universe, and Everything
582 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!