Finding Mode and Median Without Mode and Median Function
1 view (last 30 days)
Show older comments
How do I find the mode and medians of different columns without using the mode or median function (requested by assignment)? I have 22 rows and 29 columns I need to get modes for.
0 Comments
Answers (1)
Steven Lord
on 20 Feb 2021
If I gave you a list of numbers:
A = randi(10, 1, 7)
How would you compute the mode and median of A with pencil and paper (or marker and whiteboard, or stick and sandbox, or $WRITING_UTENSIL and $SOMETHING_TO_WRITE_ON)? Once you have a process in mind, figure out how to implement that process using MATLAB code.
Or your textbook may have a suggestion for the right algorithm to use, in which case you will need to figure out how to implement that algorithm.
If after identifying the process / algorithm you have difficulty implementing it describe (in words) the process or algorithm, show us the code you've written to try to implement it, and describe in detail the difficulty you're experiencing.
See Also
Categories
Find more on Spectral Measurements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!