0% found this document useful (0 votes)
41 views5 pages

Mechanical Vibrations

The document is an assignment submission for a mechanical vibrations course. It includes two questions asking to develop computer programs to find the eigenvalues and eigenvectors of a 3x3 matrix using Jacobi's method and the matrix iteration method. Code is provided for both methods that takes user input for the matrix elements. The code for each method performs the calculations and outputs the eigenvalues and respective eigenvectors.

Uploaded by

Ravi Teja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views5 pages

Mechanical Vibrations

The document is an assignment submission for a mechanical vibrations course. It includes two questions asking to develop computer programs to find the eigenvalues and eigenvectors of a 3x3 matrix using Jacobi's method and the matrix iteration method. Code is provided for both methods that takes user input for the matrix elements. The code for each method performs the calculations and outputs the eigenvalues and respective eigenvectors.

Uploaded by

Ravi Teja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

MECHANICAL VIBRATIONS

(DE G611)

Assignment

SUBMITTED

TO
DR.SANDEEP JOSE

SUBMITTED BY
MANEPALLI RAVI TEJA (2017H1410057G)

BIRLA INSTITUTE OF TECHNOLOGY AND SCIENCE,

K. K. BIRLA, GOA CAMPUS


1)Develop a general program, to implement Jacobi’s method to find the eigenvalues and

eigenvectors of a symmetric matrix. Use the program to find the eigenvalues and
eigenvectors of the matrix

1 1 1 
 
1 2 2 
1 2 3 
 

Jacobian code:

rows=input('please enter number of rows of square matrix');

A=zeros(rows,rows);

C=zeros(rows,rows);

D=zeros(rows,rows);

V=eye(rows,rows);

N=inf;

for i=1:rows

for j=1:rows

A(i,j)=input('Enter the A elements');

end

end

B= A-diag(diag(A));

[M,I] = max(B(:));

[X,Y] = ind2sub(size(B),I);

while N >0.001

D=eye(rows);

t= 0.5*(atan(2*A(X,Y)/(A(X,X)-A(Y,Y))));

D(X,X)=cos(t);D(X,Y)=sin(t);D(Y,X)=-sin(t);D(Y,Y)=cos(t);
A=D'*A*D;

V=V*D;

C= A-diag(diag(A));

N = max(max(C));

[M,I] = max(C(:));

[X,Y] = ind2sub(size(C),I);

End

o=diag(A);

fprintf('The eigen values are \n');

fprintf('The respective eigen vector is \n');

Output:

V=

0.3281 -0.5830 -0.7433

0.5910 0.7405 -0.3199

0.7369 -0.3343 0.5875

2)Develop a general computer program, , to implement the matrix iteration method. Use
the program to find the eigenvalues and eigenvectors of the matrix [A] given in Q1
Matrix iterative method:
Code:

rows=input('please enter number of rows of square matrix');

A=eye(rows,rows);

for i=1:rows

for j=1:rows

D(i,j)=input('Enter the elements of D');

end
end

X=[1;1;1];

for i=1:rows

for j=1:8

x= D*X;

X= (1/x(1,1))*x;

end

c= X'*A*X;

w= (1/c)^(1/2);

fprintf('No.%d eigen value is %d\n',i,x(1,1));

fprintf('The respective eigen vector is \n');

X= w*X;

D= D - (x(1,1)*X*X'*A);

end

Output:

No.1 eigen value is 5.048916e+00

The respective eigen vector is

X = 0.3280

0.5910

0.7370

No.2 eigen value is 6.431004e-01

The respective eigen vector is

X = 0.7370

0.3280

-0.5910
No.3 eigen value is 3.079785e-01

The respective eigen vector is

X = 0.5910

-0.7370

0.3280

>>

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