1. Engineering
  2. Computer Science
  3. hi please write the following matlab program to the respected...

Question: hi please write the following matlab program to the respected...

Question details

Hi, please write the following MATLAB program to the respected specifications. I just wish to check my work, I would not think to just copy and paste a answer. I have a few bugs in my program and was hoping an answer will allow me to resolve them. First, read the assignment. Then, look at the format that my program is written in given the following pseudocode. Thank you.

Disclaimer: I am very new to MATLAB so please make this as simple, organized and instructive on how to use as possible.


OVERVIEW: You are teaching one large class, or several smaller classes. You want to make your grade computations as easy as possible! Therefore, you write a function to compute student grades. The m-file you submit should be a FUNCTION, where its input is a 2-D array where each row represents a list of grades for a student. For example, if the array is size m × n then there are m students, each with n grades. Your function will have two outputs: an m × 1 array of sorted student averages and the value of the overall class average. Within your submitted function, you will have TWO subfunctions - one of the subfunctions you write, the other we wrote in class. In particular, since this program is a function, note that you will not have any input statements this time. Your m-file will have the following structure:

% Note that GRADES is a 2D array of grades of arbitrary length lllc13l9lllllelll9999991l function [sorted-avgs , class-avg] = thelwerj_hx3 (GRADES); % (You dont have to type this part - this comment block % is to be replaced by your code % This function is to perform the following tasks: % 1 . For each student, drop the two lowest scores % 2. For each student, compute their grade average (assuming the 2 lowest scores have been dropped). Store a sorted list of student averages in an mx1 array sorted_avgs. % 3. Compute the overall class average (i.e., the average of all the students, averages). This value should be stored in the scalar variable class_avg. % 4. (optional, but +1 bonus point). Assign letter grades for each student! Use the standard 10-point scale. You will need to use character variables/strings for the grades. If you assign letter grades, then you should print the sorted list of averages and the corresponding letter grades to the screen. % SUBFUNCTION: Bubble Sort % Purpose: Given a list of numbers, this subfunction returns a sorted list function x-bubblesort (x); % Rewrite the bubblesort program in class using arrays. This should be % very short! I wrote this in about 5 lines of code. Do not spend % more than one evening doing this part. If you are spending longer, see me soon. % SUBFUNCTION: order % Purpose: Given two numbers, this subfunction sorts the numbers % NOTE: we did this function in class! Its also in the text (Chp 5) function [a,b]-order(a,b); if (b>a) temp-a; a-b b-temp; end

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution