Question: Code has already been provided to define a function named vectorFun that accepts a single input variable x that is an unknown random length (
Code has already been provided to define a function named vectorFun that accepts a single input variable x that is an unknown random length between and elements column vector of random numbers with values between and Add commands to do the following operations and assign the results to the indicated output variable names:
Generate a column vector y with the same number of elements as x that has evenly spaced values ranging from the minimum value in x to the maximum value in x
Generate a second column vector z in which each element of z is equal to the square of the corresponding element in x divided by times the corresponding element in y
Generate a scalar variable count that counts the number of instances an element in z has a value less than the value of the corresponding element in x
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
