Question: Problem 1 [30 points): Write a MATLAB code that takes three vectors of the same length (X, Y & Z) as input arguments (the code

Problem 1 [30 points): Write a MATLAB code that takes three vectors of the same length (X, Y & Z) as input arguments (the code does not have to check the format of the input) and returns one row vector as output. If your output vector is A, then A X.A2+ Y.*Z. However, this function must not use any array operations. It must instead use a for-loop. Problem 2 [30 points]: Write a MATLAB code that takes three vectors of the same length (X, Y & Z) as input arguments (the function does not have to check the format of the input) and returns 1 or 0 as output. The output equals 1, if each element of y lies between the corresponding elements of x and z. Otherwise, the output equals 0. The problem must be solved using a for loop Problem 3 (40 points]: Write a MATLAB code that takes one positive integer (N) as an input argument (it does not have to check the format of the input) and returns a two-dimensional array (N-by- N). If the output array is called A, then A is an N-by-N multiplication table, which means the entry with indices ii and jj is equal to the product of ii and ji. For example, A(1,1) 11 and A(N,N) N*N. The function must not use array operations but instead must use nested loops
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
