0% found this document useful (0 votes)
42 views4 pages

0801B4 Assignment4notes

This document contains instructions for 8 R programming assignments involving matrix operations: 1) Create a blank matrix, 2) Create a matrix from input vector numbers, 3) Access specific elements from a matrix, 4) Perform addition, subtraction, multiplication and division on two 2x3 matrices, 5) Print a 3x3 matrix with a for loop, 6) Create a 10x10 random number matrix, 7) Multiply a matrix by itself, 8) Concatenate two matrices row-wise and column-wise.

Uploaded by

yash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views4 pages

0801B4 Assignment4notes

This document contains instructions for 8 R programming assignments involving matrix operations: 1) Create a blank matrix, 2) Create a matrix from input vector numbers, 3) Access specific elements from a matrix, 4) Perform addition, subtraction, multiplication and division on two 2x3 matrices, 5) Print a 3x3 matrix with a for loop, 6) Create a 10x10 random number matrix, 7) Multiply a matrix by itself, 8) Concatenate two matrices row-wise and column-wise.

Uploaded by

yash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Yash Rughwani

0801IT211098

LAB ASSIGNMENT – 4

1. Write a r program to create a blank matrix.

2. Write a r program to create a matrix taking a given vector of numbers as


input.display the matrix (take numbers from 50 to 65)

3. Write a r program to access the element at 3rd column and 2nd row ,only the 3rd row and
only the 4th column of a given matrix.
Yash Rughwani

0801IT211098

4. Write a r program to create two 2*3 matrix and add,subtract,multiply and divide the
matrixes.
Yash Rughwani

0801IT211098

5. Print a 3*3 matrix using for loop.

6. Create m, a 10*10matrix filled with random numbers between 0 and 4 (use runif() to create
the random numbers).
Yash Rughwani

0801IT211098

7. Multiply m with itself (matrix multiplication).

8. Write a r program to concatenate two given matrixes row wise and column wise.

You might also like