0% found this document useful (0 votes)
70 views

Lab2 Matrix Operation in Matlab

This document contains instructions for matrix operations in Matlab: 1. It asks to create row and column vectors with specified starting points, end points, and step sizes. 2. It asks to create 3 matrices (A, B, C) with specified element values. 3. It asks to perform element-wise operations on the matrices like addition, subtraction, multiplication, and division. It also asks whether other operations like matrix multiplication are valid. 4. It asks to access specific elements of the matrices using indexing and create a new matrix from elements of A and B. 5. It asks to find the elements of one matrix (B) that are less than or equal to a specified

Uploaded by

Sen Sokha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views

Lab2 Matrix Operation in Matlab

This document contains instructions for matrix operations in Matlab: 1. It asks to create row and column vectors with specified starting points, end points, and step sizes. 2. It asks to create 3 matrices (A, B, C) with specified element values. 3. It asks to perform element-wise operations on the matrices like addition, subtraction, multiplication, and division. It also asks whether other operations like matrix multiplication are valid. 4. It asks to access specific elements of the matrices using indexing and create a new matrix from elements of A and B. 5. It asks to find the elements of one matrix (B) that are less than or equal to a specified

Uploaded by

Sen Sokha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Name:

Department:
Group:

Lab 2: Matrix Operations in Matlab

1. Write only command to create a row vector (vec1) that starts


with -10, ends at 18, with a step size of 4
2. Write only command to create a column vector (vec2) that starts
with 6, ends at -9, with a step size of -3
3. Write only command to create a row vector (vec3) that starts
with 1, ends at 90, and has exactly 20 elements
4. Write only commands to create the following three matrices
1+ 2
2 3 7 1 2 3
=[ ], = [ ], = [ 3 4 + ]
1 5 6 4 5 6
5 6

5. Calculate A + B, B + 2, A transpose(C), elements-wise A.*B


and A./B
6. Is A*B valid? Is A*transpose(B) valid?

7. Write command and show your answer using matrix indexing access
the following elements:
The element on the 2nd row and 3rd column of A
The 2nd row of B
The 3rd column of A
The 2nd elements of the 2nd and 3rd row of C
A new 2x2 matrix D, the 1st column of D is the 2nd column
of A, and the 2nd column of D is the 3rd columns of B

8. Write command to find the elements of B that is less than or


equal to 3.

Signals and Systems 1


[Date]

You might also like