0% found this document useful (0 votes)
147 views2 pages

Mat Lab Assignment 1

MAT LAB is a computational software , to test your knowledge and skills , it is basic assignment sheet

Uploaded by

Ahsan Javed
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)
147 views2 pages

Mat Lab Assignment 1

MAT LAB is a computational software , to test your knowledge and skills , it is basic assignment sheet

Uploaded by

Ahsan Javed
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/ 2

PHY- 100 Assignment

Assignment 1: Basic matrix manipulation

1. With x = 5 and y = 2, compute the following quantities:

(a) u = x + y

(b) v = xy
x
(c) w = y
4(y5)
(d) 3x6

(e) z = w3
x5
(f) t = (x5 1)

(g) w = 2(sin(x))/5

(h) p = ex1

(i) u = 2 + cos(2x)

(j) m = x + 4 + sin(0.2) + e2

2. Given a following 4 x 3 matrix



1 2 3 4

A = 5 6 7 8


9 10 11 12
perform the following operations:

(a) Extract the 3rd column of matrix A and store it in vector B.

(b) Extract the 1st and 3rd columns of matrix A and store them in matrix C.

(c) Add the 1st and 3rd rows of matrix A together and store the result in vector D

(d) Change the value in the 2nd row and 3rd column of A to -7 (instead of +7) and
call the result AA (do not destroy/change the original A matrix).

(e) Create a matrix that contains rows 1 and 3 from A, the second row of AA, and
the result of step (c). The resultant 4x4 matrix should be

1 2 3 4

9 10 11 12
BB =


5 6 7 8

10 12 14 16

1
PHY- 100 Assignment

3. Find a short Matlab expression to build the matrix:


1 2 3 4 5 6 7

A = 9 7 5 3 1 1 3


4 8 16 32 64 128 256

4. Given two matrices,


5 6 9 4

3 4 3 8
Try the following and ensure you can follow what is happening.
A + 5, A + B, A - B, A * B, A2 , A

5. Given the matrix A,


3 4 5

A = 9 7 3


4 8 12

Determine the transpose AT of the matrix A.

(a) Calculate AAT and check whether it is symmetric with C = A * B

(b) Calculate AT A and compare your answer with C

(c) Calculate 3A + 5B3

6. Given the equations,

x1 + 2x2 = 5

3x1 + 4x2 = 6

Set the equations for the following form:

Ax = B

Solve the equations to find x1 and x2 .

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy