For each MATLAB code segment shown, write the function header necessary to convert the code segment into a function. Use the guidelines specified with each problem.
(a) Assume there only needs to be one function output, the variable X and that the function will be stored in a file named CandyCrush.m.
X = 1A + B + B^A2*pi;
(b) Assume the function should have five output variables: the paintable area of each wall (all 4 walls) and the total paintable area. You may assume this function will be stored in a file named FullHouse.m.
P1 = Wall1 * RoomHeight;
P2 = Wall2 * RoomHeight;
P3 = Wall3 * RoomHeight;
P4 = Wall4 * RoomHeight;
PaintableArea = P1 + P2 + P3 + P4;
(c) Assume the function should have 3 output variables: the minimum value, the maximum value, and the average value. You may assume this function will be stored in a file named MinMaxMean.m.
MyMin = min([D,D^2,D*10]);
MyMax = max([D^3,D*3,D + 3000]);
MyMean = mean([D/2,D/3,D/4]);
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.