Problem 2Create the following vectors Create a row vector a1

Problem #2.Create the following vectors:

Create a row vector a1 consisting of the numbers {1, 4, 7, 10, 13, 16, 19, 22, 25} using the colon operator.

Create a row vector a2 that starts with the number 25, ends with the number 50, and has 12 equally spaced points in the vector using linspace.

Build a column vector a3 with five elements each with the value of 33, using theones function.

Make a column vector that includes the numbers {56, 101, 34, 72}.

Problem #3.Make a table that represents the change in area of a circle (AREA = ?*r2) and the volume of a sphere (VOLUME = 4/3*?*r3) with respect to the change in radius,

Solution

1.Column vectors are created in a similar way, however, semicolon (;) must separate the components of a column vector,

>> w = [1;4;7;10;13]

w =

1

4

7

10

13

On the other hand, a row vector is converted to a column vector using the transpose operator. The transpose operation is denoted by an apostrophe or a single quote (

Problem #2.Create the following vectors: Create a row vector a1 consisting of the numbers {1, 4, 7, 10, 13, 16, 19, 22, 25} using the colon operator. Create a r

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site