Question: MATLAB QUESTION Write a function which will be given two vectors, Needles and Haystack. Needles is a vector of numbers which may or may not

MATLAB QUESTION

Write a function which will be given two vectors, Needles and Haystack. Needles is a vector of numbers which may or may not be present in Haystack. Your function will return a vector in which each value represents the number of times each of the numbers in Needles appears in Haystack. Your resultant vector will be the same size as Needles. For example, if Haystack is [ 2 4 8 7 4 9 4 3 2] and Needles is [7 4 6] your result would be [1 3 0] because there are 1 7s, 3 4s, and 0 6s.

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!