SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Use the power method, in Matlab to determine the highest eigenvalue and corresponding
eigenvector for the matrix
Use the power method to determine the highest eigenvalue and corresponding eigenvector for the
matrix Show four iterations of your hand calculations, starting with an initial guess for the
eigenvector {111}T. Also, use the powereig.m M-file function discussed in class (posted on
Canvas under Lecture 16) to obtain the eigenvalue within 0.01% accuracy using MATLAB.
Solution
function l = ww(A,E) n = length(A); y = []; x = []; for i = 1:n % starting vector x(i) = A(i,1); end;
l = 0; blad = E; % starting value of error while blad>=E for i = 1:n % A*x y(i) = 0; for j = 1:n
y(i) = y(i) + A(i,j)*x(j); end; end; blad = l; l = 0; % Rayleigh m = 0; for i = 1:n l = l + x(i)*y(i);
m = m + x(i)*x(i); end; l = l/m; % eigenvalue blad = abs(l - blad); % error x = y; end; end

Weitere ähnliche Inhalte

Ähnlich wie Use the power method- in Matlab to determine the highest eigenvalue an.docx

CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docxCALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
RAHUL126667
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlab
Anil Maurya
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
Kurmendra Singh
 
Consider a 4-Link robot manipulator shown below. Use the forward kine.pdf
Consider a 4-Link robot manipulator shown below. Use the forward kine.pdfConsider a 4-Link robot manipulator shown below. Use the forward kine.pdf
Consider a 4-Link robot manipulator shown below. Use the forward kine.pdf
meerobertsonheyde608
 

Ähnlich wie Use the power method- in Matlab to determine the highest eigenvalue an.docx (17)

Gradient Decent in Linear Regression.pptx
Gradient Decent in Linear Regression.pptxGradient Decent in Linear Regression.pptx
Gradient Decent in Linear Regression.pptx
 
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkMATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
 
Matlab booklet
Matlab bookletMatlab booklet
Matlab booklet
 
Matlab1
Matlab1Matlab1
Matlab1
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Dsp file
Dsp fileDsp file
Dsp file
 
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docxCALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
CALIFORNIA STATE UNIVERSITY, NORTHRIDGEMECHANICAL ENGINEERIN.docx
 
Basics of matlab
Basics of matlabBasics of matlab
Basics of matlab
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
 
Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013Dsp lab _eec-652__vi_sem_18012013
Dsp lab _eec-652__vi_sem_18012013
 
Matlabtut1
Matlabtut1Matlabtut1
Matlabtut1
 
Matlab practice
Matlab practiceMatlab practice
Matlab practice
 
Numerical Methods
Numerical MethodsNumerical Methods
Numerical Methods
 
MATLAB for Technical Computing
MATLAB for Technical ComputingMATLAB for Technical Computing
MATLAB for Technical Computing
 
Matlab eig
Matlab eigMatlab eig
Matlab eig
 
Consider a 4-Link robot manipulator shown below. Use the forward kine.pdf
Consider a 4-Link robot manipulator shown below. Use the forward kine.pdfConsider a 4-Link robot manipulator shown below. Use the forward kine.pdf
Consider a 4-Link robot manipulator shown below. Use the forward kine.pdf
 
Matlab for marketing people
Matlab for marketing peopleMatlab for marketing people
Matlab for marketing people
 

Mehr von slyndon

Using the competing values framework as a point of reference- how woul.docx
Using the competing values framework as a point of reference- how woul.docxUsing the competing values framework as a point of reference- how woul.docx
Using the competing values framework as a point of reference- how woul.docx
slyndon
 
Using Java- Windows on the desktop are just one of many objects used i.docx
Using Java- Windows on the desktop are just one of many objects used i.docxUsing Java- Windows on the desktop are just one of many objects used i.docx
Using Java- Windows on the desktop are just one of many objects used i.docx
slyndon
 

Mehr von slyndon (20)

Use the Referraces to acce inportant val In the following net ionic eq.docx
Use the Referraces to acce inportant val In the following net ionic eq.docxUse the Referraces to acce inportant val In the following net ionic eq.docx
Use the Referraces to acce inportant val In the following net ionic eq.docx
 
Use the References to access importantv It is often possible to change.docx
Use the References to access importantv It is often possible to change.docxUse the References to access importantv It is often possible to change.docx
Use the References to access importantv It is often possible to change.docx
 
Use the following financial statements for Lake of Egypt Marina- Inc-.docx
Use the following financial statements for Lake of Egypt Marina- Inc-.docxUse the following financial statements for Lake of Egypt Marina- Inc-.docx
Use the following financial statements for Lake of Egypt Marina- Inc-.docx
 
Use SQL to Create a table with at least 4 attributes one of which is t.docx
Use SQL to Create a table with at least 4 attributes one of which is t.docxUse SQL to Create a table with at least 4 attributes one of which is t.docx
Use SQL to Create a table with at least 4 attributes one of which is t.docx
 
Using your own words and one complete sentence per term- define the fo.docx
Using your own words and one complete sentence per term- define the fo.docxUsing your own words and one complete sentence per term- define the fo.docx
Using your own words and one complete sentence per term- define the fo.docx
 
Using the method of 1-2 reactions balance the skeleton equation- I2 +.docx
Using the method of 1-2 reactions balance the skeleton equation- I2 +.docxUsing the method of 1-2 reactions balance the skeleton equation- I2 +.docx
Using the method of 1-2 reactions balance the skeleton equation- I2 +.docx
 
Using the descriptions of the attributes given in the ERD below- provi.docx
Using the descriptions of the attributes given in the ERD below- provi.docxUsing the descriptions of the attributes given in the ERD below- provi.docx
Using the descriptions of the attributes given in the ERD below- provi.docx
 
Using the following definition for a Binary Tree Node - complete the f.docx
Using the following definition for a Binary Tree Node - complete the f.docxUsing the following definition for a Binary Tree Node - complete the f.docx
Using the following definition for a Binary Tree Node - complete the f.docx
 
using the concepts of bonding and polarity explaining the importance o.docx
using the concepts of bonding and polarity explaining the importance o.docxusing the concepts of bonding and polarity explaining the importance o.docx
using the concepts of bonding and polarity explaining the importance o.docx
 
Using the competing values framework as a point of reference- how woul.docx
Using the competing values framework as a point of reference- how woul.docxUsing the competing values framework as a point of reference- how woul.docx
Using the competing values framework as a point of reference- how woul.docx
 
Using jsfiddle-net In Javascript we are going to create a doubly Linke.docx
Using jsfiddle-net In Javascript we are going to create a doubly Linke.docxUsing jsfiddle-net In Javascript we are going to create a doubly Linke.docx
Using jsfiddle-net In Javascript we are going to create a doubly Linke.docx
 
Using Haskell- I need- -- - Produce a list where sequences of repeated.docx
Using Haskell- I need- -- - Produce a list where sequences of repeated.docxUsing Haskell- I need- -- - Produce a list where sequences of repeated.docx
Using Haskell- I need- -- - Produce a list where sequences of repeated.docx
 
Using Java- Windows on the desktop are just one of many objects used i.docx
Using Java- Windows on the desktop are just one of many objects used i.docxUsing Java- Windows on the desktop are just one of many objects used i.docx
Using Java- Windows on the desktop are just one of many objects used i.docx
 
Using examples describe five major reasons for segregation of duties w.docx
Using examples describe five major reasons for segregation of duties w.docxUsing examples describe five major reasons for segregation of duties w.docx
Using examples describe five major reasons for segregation of duties w.docx
 
Using Java- Evaluate the expression- Be sure to list a value of approp.docx
Using Java- Evaluate the expression- Be sure to list a value of approp.docxUsing Java- Evaluate the expression- Be sure to list a value of approp.docx
Using Java- Evaluate the expression- Be sure to list a value of approp.docx
 
Using Java- code a dynamic Linear Quotient Hashing data structure that.docx
Using Java- code a dynamic Linear Quotient Hashing data structure that.docxUsing Java- code a dynamic Linear Quotient Hashing data structure that.docx
Using Java- code a dynamic Linear Quotient Hashing data structure that.docx
 
using C++ to Write a program to demonstrate an array of 10 elements an.docx
using C++ to Write a program to demonstrate an array of 10 elements an.docxusing C++ to Write a program to demonstrate an array of 10 elements an.docx
using C++ to Write a program to demonstrate an array of 10 elements an.docx
 
Using complete sentences- briefly answer the following- A) Accurately.docx
Using complete sentences- briefly answer the following- A) Accurately.docxUsing complete sentences- briefly answer the following- A) Accurately.docx
Using complete sentences- briefly answer the following- A) Accurately.docx
 
Using a practical example- what are the benefits and potential problem.docx
Using a practical example- what are the benefits and potential problem.docxUsing a practical example- what are the benefits and potential problem.docx
Using a practical example- what are the benefits and potential problem.docx
 
User Interface Engneering A company is designing a kiosk that can disp.docx
User Interface Engneering A company is designing a kiosk that can disp.docxUser Interface Engneering A company is designing a kiosk that can disp.docx
User Interface Engneering A company is designing a kiosk that can disp.docx
 

Kürzlich hochgeladen

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Kürzlich hochgeladen (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

Use the power method- in Matlab to determine the highest eigenvalue an.docx

  • 1. Use the power method, in Matlab to determine the highest eigenvalue and corresponding eigenvector for the matrix Use the power method to determine the highest eigenvalue and corresponding eigenvector for the matrix Show four iterations of your hand calculations, starting with an initial guess for the eigenvector {111}T. Also, use the powereig.m M-file function discussed in class (posted on Canvas under Lecture 16) to obtain the eigenvalue within 0.01% accuracy using MATLAB. Solution function l = ww(A,E) n = length(A); y = []; x = []; for i = 1:n % starting vector x(i) = A(i,1); end; l = 0; blad = E; % starting value of error while blad>=E for i = 1:n % A*x y(i) = 0; for j = 1:n y(i) = y(i) + A(i,j)*x(j); end; end; blad = l; l = 0; % Rayleigh m = 0; for i = 1:n l = l + x(i)*y(i); m = m + x(i)*x(i); end; l = l/m; % eigenvalue blad = abs(l - blad); % error x = y; end; end