Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a 7 by 2 0 array filled with random numbers from the following set: - 2 , 0 , 2 , 4 . The

Create a 7 by 20 array filled with random numbers from the following set: -2,0,2,4. The name of the array should be K.
How many elements in your array are equal to 4? The answer should be assigned to N1.
How many elements in your array are less than 2? The answer should be assigned to N2.
This script should be fully vectorized. You don't have to aim for the shortest script, but the problem can be solved with three lines of code (try to achieve this to improve your skills).
HINT: you should use a relational expression to identify the elements you are interested in and then you should use a built-in function for summation.
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

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions