Question: P 2 . ( 1 5 pts . ) Write the MATLAB code for the following problem: Read an input row vector of arbitrary length
P pts Write the MATLAB code for the following problem: Read an input row vector
of arbitrary length take it at least of length with integer elements. Count how many of the
elements of the vector are equal to zero, how many are negative, how many are positive but
less than and how many are of neither of these types. Display the result as a single column
vector containing all the counters. Select an input vector of your choice at least elements
and show the execution of your code on this vector.
Hint: determine the size of the vector, run a for loop through all the elements of the
vector and for each of the elements perform each type of the required tests
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
