computer question

558fe5180e0e8fc922d31c23ef84d240

Score calculation
1.1 Write a function in Matlab that accepts the degree of writing as input arguments
bg and the degree of work be and return the final degree bt, which is calculated as o
average grades of work and writing with the following exceptions:
i. If the grade of the writing is zero then the final grade is 0.
ii. If the writing grade is less than 3, then the final grade is the average
if the average is less than 4, or otherwise 4.
iii. If the grade of the work is less than 5, then the final grade is the average
if the average is less than 4, or otherwise 4.
The final score will be rounded to the nearest whole number using the round (x) function.
1.2 Change the function so that it accepts registers as arguments.