Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions