Question: MATLAB (15 points) Please write a User Defined Function (UDF) that has one input and three outputs. The input is a matrix, and the three

MATLAB
MATLAB (15 points) Please write a User Defined Function (UDF) that has

(15 points) Please write a User Defined Function (UDF) that has one input and three outputs. The input is a matrix, and the three outputs are (1) the average value of the input matrix, (2) the number of elements that are greater than the average value, and (3) the number of elements that are smaller than the average value. You must use 'for' loop or 'while' loop to do this question. (10 points) Write a script that you will test your UDF from (i) for the following three input matrices (or vector). - Matrix A: get matrix A from Matlab command: randil(100, 6, 7). - Vector B: Use colon operator to get vector B that is from -0.3 to 0.6 with step size of 0.05 . - Matrix C=[12445;778910;22222]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!