Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Matlab homework PROBLEM1 (50 points) Write a short Matlab program to perform the

ID: 2255775 • Letter: M

Question

Matlab homework

PROBLEM1 (50 points) Write a short Matlab program to perform the followinmatrix operations: Cl-A-B, C2-A-B. C3-AB. C4-AB, where .3 44 6.6 67 76 8.3 9.6 106 0.5 33 10.73 9.22 86 7.7 65 5 4.4 87 6.64 .45 9.89 10.2 11 2.56 34 10.6 95 8.54 77 6.7 58 of AB 1. Explain the m 2. Give the values of. C1(1,4), C22,2), C3(4,3), C3(3,1) 3. Calculate the inverse matrices ofA 4. Calculate the determinants of B 5. Determine the eigen-values and eigen-vectors of the matrix C3. Explain the concept of eigen-values and eigen-vectors. PROBLEM 2 (50 points) Plot the graph of the following trigonometric functions: Ji (x) = 4e-ois y,(x)-4esinx) 0 x 10 0 x 10 Compute the above functions using an increment of 1 radian then an increment of 0.0001 radian. 1. Explain the differences between the functions y1 y2,and ya. Identify the influential parameter that makes the difference between these functions? 2. Plot the graph of the a versus ya. Explain the graph. Provide all Matlab programs!

Explanation / Answer

%%% Matlab programme

clc;
clear all;
close all;
disp('Problem -1');
A=[3.3 44 6.6 67;76 8.3 9.6 106;0.5 33 10.73 9.22;86 7.7 65 5];
B=[4.4 87 6.64 77;8.45 9.89 10.2 11;2.56 34 10.6 95;8.54 77 6.7 58];
C1=A+B;
C2=A-B;
C3=A*B;
C4=A/B;
disp('1. -> A/B means A*inv(B)');
fprintf( '2. C1(1,4)= %f C2(2,2)=%f C3(4,3)= %f C3(3,1)=%f ',C1(1,4),C2(2,2),C3(4,3),C3(3,1));
inv_A=inv(A);
disp('3. Inverse of A is :');
inv_A
det_B=det(B);
fprintf('4. Determinant of B = %f ',det_B);

OUTPUT:

Problem -1
1. -> A/B means A*inv(B)
2. C1(1,4)= 144.000000
C2(2,2)=-1.590000
C3(4,3)= 1372.080000
C3(3,1)=387.257600
3. Inverse of A is :

inv_A =

   -0.0452    0.0241    0.0561   -0.0082
   -0.0272    0.0119    0.0658   -0.0099
    0.0608   -0.0328   -0.0791    0.0271
    0.0290   -0.0058   -0.0382    0.0042

4. Determinant of B = -154515.718688