Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In MATLAB please i. (15 points) Please write a User Defined Function (UDF) that has one input and three outputs. The input is a matrix,
In MATLAB please
i. (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. ii. (10 points) Write a script that you will test your UDF from (j) for the following three input matrices (or vector). - Matrix A: get matrix A from Matlab command: randi(100, 7, 6). - Vector B: Use colon operator to get vector B that is from -0.4 to 0.8 with step size of 0.05Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started