Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribedIn 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.05

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

Students also viewed these Databases questions