Question: Matlab Question Let vec1 = linspace(0,100,200), and let vec2 = sin(vec1). a). Compute the number of elements of vec2 that are negative, and assign the

Matlab Question

Let vec1 = linspace(0,100,200), and let vec2 = sin(vec1).

a). Compute the number of elements of vec2 that are negative, and assign the result to res1.

b). Determine whether all the elements of vec2 are greater than -1. Let the result be res2, where res2=1 if true and res2 = 0 if false.

c). Find the maximum index value at which an element of vec2 is greater than -0.5 and assign the result to res3.

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!