Question: Problem 3 - A random vector with logical and relational operators 0 solutions submitted ( max: Unlimited ) Type the appropriate Matlab commands to do

Problem 3- A random vector with logical and relational operators
0 solutions submitted (max: Unlimited)
Type the appropriate Matlab commands to do the following operations and assign the results to the indicated output variable names:
Create a random row vector of 100 uniformly distributed pseudorandom integers between -30 and 30. Assign this to the variable A. Check out the following
link from Matlab help for more information on randi. Matlab Documentation is a great place to get help and learn how to use built-in functions in different ways.
Create a second row vector B that consists of only the negative numbers in A in the same order in which they occur in A.
Create a scalar variable C that counts how many of the elements of A are between -20 and 20(not including -20 and 20).
Solve this problem using vectorized code. Your code should not include the following MATLAB functions or keywords: if, for, while. You will receive a
deduction if you use any of these.
 Problem 3- A random vector with logical and relational operators 0

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!