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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!