Question

IN R a <- (seq(4,100, by =4)) b<- (seq(.8,40, by = .8)) 1. Combine a and...

IN R

a <- (seq(4,100, by =4))

b<- (seq(.8,40, by = .8))

1. Combine a and b as columns to create a new matrix.

2. combine a and b as rows to create a new matrix.

Homework Answers

Answer #1

a)

cbind(a,b)

Output

       a    b
 [1,]   4  0.8
 [2,]   8  1.6
 [3,]  12  2.4
 [4,]  16  3.2
 [5,]  20  4.0
 [6,]  24  4.8
 [7,]  28  5.6
 [8,]  32  6.4
 [9,]  36  7.2
[10,]  40  8.0
[11,]  44  8.8
[12,]  48  9.6
[13,]  52 10.4
[14,]  56 11.2
[15,]  60 12.0
[16,]  64 12.8
[17,]  68 13.6
[18,]  72 14.4
[19,]  76 15.2
[20,]  80 16.0
[21,]  84 16.8
[22,]  88 17.6
[23,]  92 18.4
[24,]  96 19.2
[25,] 100 20.0
[26,]   4 20.8
[27,]   8 21.6
[28,]  12 22.4
[29,]  16 23.2
[30,]  20 24.0
[31,]  24 24.8
[32,]  28 25.6
[33,]  32 26.4
[34,]  36 27.2
[35,]  40 28.0
[36,]  44 28.8
[37,]  48 29.6
[38,]  52 30.4
[39,]  56 31.2
[40,]  60 32.0
[41,]  64 32.8
[42,]  68 33.6
[43,]  72 34.4
[44,]  76 35.2
[45,]  80 36.0
[46,]  84 36.8
[47,]  88 37.6
[48,]  92 38.4
[49,]  96 39.2
[50,] 100 40.0

b)

rbind(a,b)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Consider the matrix A= −2−2 6] [−2−3 5] [3 4−8] [−7−9 18 (all one matrix) (a)...
Consider the matrix A= −2−2 6] [−2−3 5] [3 4−8] [−7−9 18 (all one matrix) (a) How many rows ofAcontain a pivot position? (b) Do the columns ofAspanR4? (c) Does the equationA ~x=~b have a solution for every~b∈R^4? (d) Would the equation A~x=~0 have a nontrivial solution? (e) Are the columns of A linearly independent? (~x is vector x)
Matlab Queatoin: The test suite generates a random M x N matrix with a random number...
Matlab Queatoin: The test suite generates a random M x N matrix with a random number of rows and columns that is assigned to the variable A . The element values of the matrix are random double precision numbers that fall in the range from -10 to 10. The matrix has between 5 and 10 rows and between 5 and 10 columns. Assuming A is defined in the workspace, write a script with commands to perform the operations described below...
In c++, use nested loops to print a matrix with all the even numbers from 1...
In c++, use nested loops to print a matrix with all the even numbers from 1 to 80 displayed in 5 rows and 8 columns.
1. Let a,b,c,d be row vectors and form the matrix A whose rows are a,b,c,d. If...
1. Let a,b,c,d be row vectors and form the matrix A whose rows are a,b,c,d. If by a sequence of row operations applied to A we reach a matrix whose last row is 0 (all entries are 0) then:        a. a,b,c,d are linearly dependent   b. one of a,b,c,d must be 0.       c. {a,b,c,d} is linearly independent.       d. {a,b,c,d} is a basis. 2. Suppose a, b, c, d are vectors in R4 . Then they form a...
Here are some vectors in R 4 : u1 = [1 3 −1 1] u2 =...
Here are some vectors in R 4 : u1 = [1 3 −1 1] u2 = [1 4 −1 1] u3 = [1 0 −1 1] u4 = [2 −1 −2 2] u5 = [1 4 0 1] (a) Explain why these vectors cannot possibly be independent. (b) Form a matrix A whose columns are the ui’s and compute the rref(A). (c) Solve the homogeneous system Ax = 0 in parametric form and then in vector form. (Be sure the...
Consider the matrix list x = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. Write...
Consider the matrix list x = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]. Write a list comprehension to extract the first column of the matrix [1, 4, 7]. Write another list comprehension to create a vector of twice the square of the middle column.
1. Let S and R be two relations below. R = {(1, 3), (1, 2), (8,...
1. Let S and R be two relations below. R = {(1, 3), (1, 2), (8, 0), (6, 9)} S = {(7, 5), (1, 6), (3, 1), (0, 3), (9, 4), (8, 6)} Please find S◦R and R◦S. Given two relations S and R on Z below, please determine the following relations. R = {(a, b) |a + 2 = b} S = {(a, b) |3a > b} (a) R−1 (b) R (c) R◦R (d) R−1 ◦ R (e) R−1...
Let p = (8, 10, 3, 11, 4, 0, 5, 1, 6, 2, 7, 9) and...
Let p = (8, 10, 3, 11, 4, 0, 5, 1, 6, 2, 7, 9) and let q = (2, 4, 9, 5, 10, 6, 11, 7, 0, 8, 1, 3) be tone rows. Verify that p = Tk(R(I(q))) for some k, and find this value of k.
In R studio please explain how to do the stemplot? A sample of 20 endangered species...
In R studio please explain how to do the stemplot? A sample of 20 endangered species was obtained and the length of time (in months) since being placed on the list was recorded for each species. A stemplot of these data follows. In the stemplot, 5|2 represents 52 months. 5   2 4 8 9 9 6   0 0 3 5 6 7 8 9 7   3 4 7 8 9 9 8 9   8 The median length of time (in...
let A = {−4, 4, 5, 8} and B = {4, 5, 6} and define relations...
let A = {−4, 4, 5, 8} and B = {4, 5, 6} and define relations R and S from A to B as follows: For all elements (x in A , y in B) , x R y ⇔ |x| = |y| + 1 and x S y ⇔ x /y is an integer. 1. Find A X B and A intersect B. 2. Is the relation R reflexive ? Justify your answer.