Question: Write a MATLAB function check318 (Yin)that takes a vector Yin as input and returns a second vector Yout that contains only the negative values. It

Write a MATLAB function check318 (Yin)that takes a vector Yin as input and returns a second vector Yout that contains only the negative values. It will return an empty matrix if all elements are positive. See the attached worked example for help. >> y1 = [18, -5, 89, -7, 4, 10, 12, 34, -2, 451: >>y2 [34, 67, 89, 0, 12, 87, 0, 5] >> z1 = check318 (y1) -57 2 >> z2 = check318 (y2 )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
