Question: Problem 2 O solutions submitted (max 3) Problem 3 O solutions submitted (max 3) Creat a matta function that calculates for two vectors of values

Problem 2 O solutions submitted (max 3) Problem 3 O solutions submitted (max 3) Creat a matta function that calculates for two vectors of values x and y Using the function ceated in Problem 2, calculate foxy) for vectors and y Create the vectors x and y defined as follows 1. vector x which goes from 4 to 4 at a step of 0.1 2 vectory which goes from 8 to 8 and has the same number of elements as of array x. - Save the output in a variable called fxy Create a 1 row 2 column (1x2) subplot 1. In the first pane, include a plot of vector y against vector x 2. In the second pane, include a plot of vector fxy against vector x Name your function function_xy The inputs should be in the same order .x vector of values y: vector of values - Include axis labels and titles for both plots The ouputis . fxy: is the calculated array foxy) Hint: Use element-wise operation Script 1 Define vector x 2 3 XDefine vectory Function sxCaluculate vector fxy using function "function_xy" 1 function (Outputs) 2 % Input code here YourFunctionName(Inputs) 8 Xplot 9 10 11 12 6 end Code to call your function Assessment: 1 X-linspace(-4,4,10) 2 y-linspace(-5,5,10) 3 4 fxy - function_xy(x,y) vector x is correct vector y is correct fxy is correct Suhlateleted
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
