Eng Maths (Civil) Matlab2024
Eng Maths (Civil) Matlab2024
BACHELOR OF TECHNOLOGY
FIRST SEMESTER 2023/2024 – MATLAB ASSIGNMENT
…………………………………………………………………………………..
………………………………………………………………………………….
…………………………………………………………………………………
……………………………………………………………………………….
(5) Identify the error in the operation below for the period of oscillation in a simple
pendulum
T =2∗pie∗sqrtl / g
Page 1 of 4
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
(6) Identify the error in the operation below for Newton’s second equation of motion.:
1 2
S=u∗t + ∗a∗t
2
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
(7) Assign the values of 3 and 4 to the variables x and y , respectively, then calculate
the value of z where z=2 x−7 y
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
(8) For the vector [2 4 -3 0 1 5 7], determine the range, using MATLAB codes.
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
(9) Given the two vectors [0.2 1.3 -3.5] and [0.5 -2.5 1.0], find the dot product, using
MATLAB codes.
………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………..
Given the following matrices, write down the MATLAB codes to perform the given
tasks:
( ) ( )
1 2 0 1 3 −2
A= 7 5 −3 B= 3 5 7
3 1 1 2 3 0
Page 2 of 4
(10) Multiply the two matrices, element by element.
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………..
(12) Perform the following multiple scalar operation -3*A’ / 2.4 +5.5, and write down
the output.
………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………..
(13) Write down the MATLAB code to extract the two diagonals of both matrices A
and B, then add them.
………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………..
(14) Write down the MATLAB code for, and find, the determinant of matrix A.
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
(15) Write down the MATLAB code for, and find, the inverse of matrix B.
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
(16) Write down the MATLAB code for, and find, the eigenvalues of matrix A.
Page 3 of 4
………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………..
(17) Write down the MATLAB code that will generate the output:
C= ( 33 −20 )
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
(18) Write down the MATLAB code that will generate the output:
D= (13 01)
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
(19) Write down the MATLAB code that will generate the output:
E= (51 −3
1 )
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
(20) Write down the MATLAB code that will generate the output:
F= ( 21)
………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………..
MOA/24
Page 4 of 4