You are given an array containing the number of students in various academic departments of a university, along with a parallel cell array of the department names.
Write a MATLAB function that analyzes this data using vectorization techniques. The function must return 5 numeric/text outputs and generate a bar plot.
Your function should calculate and return:
  1. top_dept: The name of the department with the highest number of students (if there is a tie, return the first one).
  2. total_students: The total number of students in the entire university.
  3. total_depts: The total number of departments.
  4. me_students: The number of students specifically in the 'ME' department.
  5. dept_55_students: The name of the department(s) that has exactly 55 students. (Return as a string or cell array).
Additionally, the function must display a bar plot of the student data with the department names labeled on the X-axis.

Solution Stats

3 Solutions

3 Solvers

Last Solution submitted on Jun 14, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...

Problem Recent Solvers3

Suggested Problems

More from this Author18

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!