SlideShare a Scribd company logo
1 of 1
Download to read offline
Problem 2 (programming excercise) Consider the following matrix (which comes from
discretization of differential equation). A=(aij),aii=2(1in),ai,i+1=1(1in1), and ai,i1=1(2in). The matrix
is tri-diagonal. In matlab, A=2diag(ones(n,1))+diag(ones(n1,1),1)+diag(ones(n1,1),1). For the right
hand side, b1=bn=1,bi=01<i<n for solving Ax=b. Using Gauss-Seidel iterative method with
tolerance 105 report the residuals and the number of iterations for n=10,n=20, and n=40. How
does n affect the number of iterations?

More Related Content

More from aadeshwarexports

More from aadeshwarexports (20)

Problem 723 Stock Valuation LO 1 Youve collected the fol.pdf
Problem 723 Stock Valuation LO 1 Youve collected the fol.pdfProblem 723 Stock Valuation LO 1 Youve collected the fol.pdf
Problem 723 Stock Valuation LO 1 Youve collected the fol.pdf
 
Problem 62 The historical annual returns of stocks X and Y.pdf
Problem 62 The historical annual returns of stocks X and Y.pdfProblem 62 The historical annual returns of stocks X and Y.pdf
Problem 62 The historical annual returns of stocks X and Y.pdf
 
Problem 6 20 Points Sketch the output waveforms Q1Q2Q3.pdf
Problem 6 20 Points Sketch the output waveforms Q1Q2Q3.pdfProblem 6 20 Points Sketch the output waveforms Q1Q2Q3.pdf
Problem 6 20 Points Sketch the output waveforms Q1Q2Q3.pdf
 
Problem 53 The historical annual returns of a stock are Y.pdf
Problem 53 The historical annual returns of a stock are Y.pdfProblem 53 The historical annual returns of a stock are Y.pdf
Problem 53 The historical annual returns of a stock are Y.pdf
 
Problem 4 Two continuous random variables X and Y have a jo.pdf
Problem 4 Two continuous random variables X and Y have a jo.pdfProblem 4 Two continuous random variables X and Y have a jo.pdf
Problem 4 Two continuous random variables X and Y have a jo.pdf
 
PROBLEM 4 Honoring Buzz Function Name fancyBuzz Paramet.pdf
PROBLEM 4 Honoring Buzz Function Name fancyBuzz Paramet.pdfPROBLEM 4 Honoring Buzz Function Name fancyBuzz Paramet.pdf
PROBLEM 4 Honoring Buzz Function Name fancyBuzz Paramet.pdf
 
Problem 4 Closing Entries 22 points Following is an alph.pdf
Problem 4 Closing Entries  22 points Following is an alph.pdfProblem 4 Closing Entries  22 points Following is an alph.pdf
Problem 4 Closing Entries 22 points Following is an alph.pdf
 
Problem 4Lexical Semantics The WordNet entry for the nouns .pdf
Problem 4Lexical Semantics The WordNet entry for the nouns .pdfProblem 4Lexical Semantics The WordNet entry for the nouns .pdf
Problem 4Lexical Semantics The WordNet entry for the nouns .pdf
 
Problem 5 4 pts each part Let A be the language accepted.pdf
Problem 5  4 pts each part Let A be the language accepted.pdfProblem 5  4 pts each part Let A be the language accepted.pdf
Problem 5 4 pts each part Let A be the language accepted.pdf
 
Problem 4 IP Routing Table Design 20 pts Consider an IP n.pdf
Problem 4 IP Routing Table Design 20 pts Consider an IP n.pdfProblem 4 IP Routing Table Design 20 pts Consider an IP n.pdf
Problem 4 IP Routing Table Design 20 pts Consider an IP n.pdf
 
Problem 4 Buffons needle problem 20 points graded on ac.pdf
Problem 4 Buffons needle problem 20 points graded on ac.pdfProblem 4 Buffons needle problem 20 points graded on ac.pdf
Problem 4 Buffons needle problem 20 points graded on ac.pdf
 
Problem 4 Budgeting Time for Chilling Consider the followin.pdf
Problem 4 Budgeting Time for Chilling Consider the followin.pdfProblem 4 Budgeting Time for Chilling Consider the followin.pdf
Problem 4 Budgeting Time for Chilling Consider the followin.pdf
 
Problem 4 Category OPTIONAL Design Design a PDA to rec.pdf
Problem 4 Category OPTIONAL Design  Design a PDA to rec.pdfProblem 4 Category OPTIONAL Design  Design a PDA to rec.pdf
Problem 4 Category OPTIONAL Design Design a PDA to rec.pdf
 
Problem 3 Three of the many recessive mutations in Drosophil.pdf
Problem 3 Three of the many recessive mutations in Drosophil.pdfProblem 3 Three of the many recessive mutations in Drosophil.pdf
Problem 3 Three of the many recessive mutations in Drosophil.pdf
 
Problem 3 For Gainesville Florida a flat surface facing so.pdf
Problem 3 For Gainesville Florida a flat surface facing so.pdfProblem 3 For Gainesville Florida a flat surface facing so.pdf
Problem 3 For Gainesville Florida a flat surface facing so.pdf
 
Problem 3 In an experiment to monitor two calls the PMF of.pdf
Problem 3 In an experiment to monitor two calls the PMF of.pdfProblem 3 In an experiment to monitor two calls the PMF of.pdf
Problem 3 In an experiment to monitor two calls the PMF of.pdf
 
Problem 3 20 points Absolute PPP Suppose the price of co.pdf
Problem 3 20 points Absolute PPP Suppose the price of co.pdfProblem 3 20 points Absolute PPP Suppose the price of co.pdf
Problem 3 20 points Absolute PPP Suppose the price of co.pdf
 
Problem 13 10 points Given a language L define AlphaL t.pdf
Problem 13 10 points Given a language L define AlphaL t.pdfProblem 13 10 points Given a language L define AlphaL t.pdf
Problem 13 10 points Given a language L define AlphaL t.pdf
 
Problem 13 10 points Given a language L define Alpha L .pdf
Problem 13 10 points Given a language L define Alpha L .pdfProblem 13 10 points Given a language L define Alpha L .pdf
Problem 13 10 points Given a language L define Alpha L .pdf
 
Problem 2First Order Logic Concept The following FOL rule .pdf
Problem 2First Order Logic Concept The following FOL rule .pdfProblem 2First Order Logic Concept The following FOL rule .pdf
Problem 2First Order Logic Concept The following FOL rule .pdf
 

Recently uploaded

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
 

Recently uploaded (20)

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
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
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
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Ữ Â...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
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...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
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
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
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
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

Problem 2 programming excercise Consider the following mat.pdf

  • 1. Problem 2 (programming excercise) Consider the following matrix (which comes from discretization of differential equation). A=(aij),aii=2(1in),ai,i+1=1(1in1), and ai,i1=1(2in). The matrix is tri-diagonal. In matlab, A=2diag(ones(n,1))+diag(ones(n1,1),1)+diag(ones(n1,1),1). For the right hand side, b1=bn=1,bi=01<i<n for solving Ax=b. Using Gauss-Seidel iterative method with tolerance 105 report the residuals and the number of iterations for n=10,n=20, and n=40. How does n affect the number of iterations?