Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. A) Make a vector called v1 that contains all multiples of 3 from 18 to 180. B) Compute the sum of the elements in

1.

A) Make a vector called v1 that contains all multiples of 3 from 18 to 180.

B) Compute the sum of the elements in v1.

C) Compute the average (mean) of the elements in v1.

R code here:

2.

A) Make a vector containing the integers from 1000 to 1 (decreasing), give it the name w.

B) Using w, make a vector w2 that only contains those elements of w that are NOT a multiple of 7.

C) Using w or w2, make a vector w3 that only contains those elements of w that are NEITHER a multiple of 7 or 9.

R code here:

3.

A) Make a vector p1 that contains the first 20 powers of 2 (2, 4, 8 etc.).

B) Make a vector p2 that contains the first 20 squares (1, 4, 9 etc.).

C) Make a 2-by-10 matrix (2 rows, 10 columns) whose first row is p1 and the second row is p2.

D) Make a 10-by-3 matrix whose first column is p1, the second column is p2 and the third column is all 0.

R code here:

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions