Question: Use Matlab language for the three function 1. Write a function findeltl(w, x) which returns true if the element x is in the vector w
Use Matlab language for the three function1. Write a function findeltl(w, x) which returns true if the element x is in the vector w and returns false otherwise. Use the following pseudocode as your template (i.e., if you know a better or faster way to write this function, you're not allowed to use that faster way) default output is false for each element a in w = if a is equal to x, return true 2. Write a function methodl(v, w) which takes as input two vectors v and w and returns true if every element in v is in w and returns flse otherwise. Use the following pseudocode as your template. Make sure you are not copying and pasting any code from findelt1. You should be calling findeltl directly within this function. default output is true for each element a in v $ use findeltl that you wrote above if a is not in w, return false 3. Write a function method2(v, w) which takes as input two vectors v and w and returns true if every element in v is in w and returns false otherwise. In this function use sort(w) instead of w. Use the findelt1 as your calling function again
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
