Compute the value of the function y = xe-x cos (2x) when x = 10. 2. MATRICES (a) Construct…

Compute the value of the function y = xe-x cos (2x) when x = 10. 2. MATRICES (a) Construct…

Question:

   

Transcribed Image Text:

Compute the value of the function y = x¹e-³x cos (2x) when x = 10.
2. MATRICES
(a) Construct a matrix A, where
A =
1
3 5 7)
10 8 6 4
2 4 68
3
5 7 9,
(b) Construct matrix Bfrom A, where Btakes only the third and fourth columns of the
first and second rows.
3. VECTOR AND MATRIX
(a) Construct a vector vsuch that
v(n) = 15e “cos(0.125лn)
(b) Generate a 5 x 5 matrix Mwith elements
x = 1 to 5
M (x, y) = x²y
You can only use one line to complete the task.
n = 0, 1, 2, 3, …, 20 4. LOOPS
(a) Using FOR loops, generate a 6 x 6 matrix with elements (x, y= 1 to 6)
Y(x, y) = 2x + y²
(b) Using WHILE Loops to compute the value of
2023 Fall
i=20,j=5
Σ i+2j
i=0,j=0 5. PLOT
(a) Plot y(t) and z(t) on the same graph, for 1st≤5 (with 1000 data points), such that
y(t) = 3e-0.5t cos(x²)
z(t) = 2-y(t)
(b) Plot the following four signals on the same graph (set the step size to 0.2)
a(t₁) = 1 + t
b(1₂) = cos(2₂)
c(13) = (2+)²
d(14) = 514-8
a
с
b
d
,-5