SlideShare una empresa de Scribd logo
1 de 2
Write a program in MATLAB to implement the algorithm of Gaussian Elimination Method.
Mandatory implementation steps
Write a program in MATLAB to implement the algorithm of Gaussian Elimination Method.
Mandatory implementation steps
Solution
function [A ] = GE(A)
A = [1 9 4 5 ;
-11 -2 3 0 ;
0 -6 5 4 ;
3 5 7 -3;
]
n=4
[ cv Ir] = max(abs( A) )
% [ v I] = max(abs( A') )
[ rv Ic] = max(cv)
row= Ir(Ic)
temp = A(1, : )
A(1, : ) = A( row, :)
A( row, :) = temp
for i = 1:n-1
m = -A(i+1:n,i)/A(i,i);
A(i+1:n,:) = A(i+1:n,:) + m*A(i,:);
% b(i+1:n,:) = b(i+1:n,:) + m*b(i,:);
end;
A
return
Write a program in MATLAB to implement the algorithm of Gaussian Elimi.docx

Más contenido relacionado

Más de drosa1

Write a program to throw the InputMismatchException-Solutionimport jav.docx
Write a program to throw the InputMismatchException-Solutionimport jav.docxWrite a program to throw the InputMismatchException-Solutionimport jav.docx
Write a program to throw the InputMismatchException-Solutionimport jav.docxdrosa1
 
You are a security consultant for a company that has a location in Hou (1).docx
You are a security consultant for a company that has a location in Hou (1).docxYou are a security consultant for a company that has a location in Hou (1).docx
You are a security consultant for a company that has a location in Hou (1).docxdrosa1
 
You are a security consultant for a company that has a location in Hou (3).docx
You are a security consultant for a company that has a location in Hou (3).docxYou are a security consultant for a company that has a location in Hou (3).docx
You are a security consultant for a company that has a location in Hou (3).docxdrosa1
 
You are a security consultant for a company that has a location in Hou (2).docx
You are a security consultant for a company that has a location in Hou (2).docxYou are a security consultant for a company that has a location in Hou (2).docx
You are a security consultant for a company that has a location in Hou (2).docxdrosa1
 
You are a security consultant for a company that has a location in Hou.docx
You are a security consultant for a company that has a location in Hou.docxYou are a security consultant for a company that has a location in Hou.docx
You are a security consultant for a company that has a location in Hou.docxdrosa1
 
You and another tech are discussing the relative merits of SCSI interf.docx
You and another tech are discussing the relative merits of SCSI interf.docxYou and another tech are discussing the relative merits of SCSI interf.docx
You and another tech are discussing the relative merits of SCSI interf.docxdrosa1
 
Write a program in C++ that will return 1 if the elements of an n-elem.docx
Write a program in C++ that will return 1 if the elements of an n-elem.docxWrite a program in C++ that will return 1 if the elements of an n-elem.docx
Write a program in C++ that will return 1 if the elements of an n-elem.docxdrosa1
 
Write a java program that reads 10 integers from the keyboard and stor.docx
Write a java program that reads 10 integers from the keyboard and stor.docxWrite a java program that reads 10 integers from the keyboard and stor.docx
Write a java program that reads 10 integers from the keyboard and stor.docxdrosa1
 
writing formulas for compounds chart Writing Formulas for Compounds Ch.docx
writing formulas for compounds chart Writing Formulas for Compounds Ch.docxwriting formulas for compounds chart Writing Formulas for Compounds Ch.docx
writing formulas for compounds chart Writing Formulas for Compounds Ch.docxdrosa1
 
Write the expression as the logarithm of a single quantity- 1.docx
Write the expression as the logarithm of a single quantity-      1.docxWrite the expression as the logarithm of a single quantity-      1.docx
Write the expression as the logarithm of a single quantity- 1.docxdrosa1
 
Write and implement a recursive version of the binary search algorithm.docx
Write and implement a recursive version of the binary search algorithm.docxWrite and implement a recursive version of the binary search algorithm.docx
Write and implement a recursive version of the binary search algorithm.docxdrosa1
 
write a file declaration that holds text charaters and can be stored i.docx
write a file declaration that holds text charaters and can be stored i.docxwrite a file declaration that holds text charaters and can be stored i.docx
write a file declaration that holds text charaters and can be stored i.docxdrosa1
 
Write a program that calculates the final value of a ten year- $10-000.docx
Write a program that calculates the final value of a ten year- $10-000.docxWrite a program that calculates the final value of a ten year- $10-000.docx
Write a program that calculates the final value of a ten year- $10-000.docxdrosa1
 
Write the equation in the slope-intercept form- Solution.docx
Write the equation in the slope-intercept form-       Solution.docxWrite the equation in the slope-intercept form-       Solution.docx
Write the equation in the slope-intercept form- Solution.docxdrosa1
 
Write the balanced neutralization reaction between H2S04 and KOH in aq.docx
Write the balanced neutralization reaction between H2S04 and KOH in aq.docxWrite the balanced neutralization reaction between H2S04 and KOH in aq.docx
Write the balanced neutralization reaction between H2S04 and KOH in aq.docxdrosa1
 
Write an outline for the following research paper topic- Managerial Ac.docx
Write an outline for the following research paper topic- Managerial Ac.docxWrite an outline for the following research paper topic- Managerial Ac.docx
Write an outline for the following research paper topic- Managerial Ac.docxdrosa1
 
write a vb program that uses a while loop that prompts a user to enter.docx
write a vb program that uses a while loop that prompts a user to enter.docxwrite a vb program that uses a while loop that prompts a user to enter.docx
write a vb program that uses a while loop that prompts a user to enter.docxdrosa1
 
Write a temperature conversion program that converts from Fahrenheit t.docx
Write a temperature conversion program that converts from Fahrenheit t.docxWrite a temperature conversion program that converts from Fahrenheit t.docx
Write a temperature conversion program that converts from Fahrenheit t.docxdrosa1
 
Write a function file in matlab that utilizes Eulers method to solve t.docx
Write a function file in matlab that utilizes Eulers method to solve t.docxWrite a function file in matlab that utilizes Eulers method to solve t.docx
Write a function file in matlab that utilizes Eulers method to solve t.docxdrosa1
 

Más de drosa1 (19)

Write a program to throw the InputMismatchException-Solutionimport jav.docx
Write a program to throw the InputMismatchException-Solutionimport jav.docxWrite a program to throw the InputMismatchException-Solutionimport jav.docx
Write a program to throw the InputMismatchException-Solutionimport jav.docx
 
You are a security consultant for a company that has a location in Hou (1).docx
You are a security consultant for a company that has a location in Hou (1).docxYou are a security consultant for a company that has a location in Hou (1).docx
You are a security consultant for a company that has a location in Hou (1).docx
 
You are a security consultant for a company that has a location in Hou (3).docx
You are a security consultant for a company that has a location in Hou (3).docxYou are a security consultant for a company that has a location in Hou (3).docx
You are a security consultant for a company that has a location in Hou (3).docx
 
You are a security consultant for a company that has a location in Hou (2).docx
You are a security consultant for a company that has a location in Hou (2).docxYou are a security consultant for a company that has a location in Hou (2).docx
You are a security consultant for a company that has a location in Hou (2).docx
 
You are a security consultant for a company that has a location in Hou.docx
You are a security consultant for a company that has a location in Hou.docxYou are a security consultant for a company that has a location in Hou.docx
You are a security consultant for a company that has a location in Hou.docx
 
You and another tech are discussing the relative merits of SCSI interf.docx
You and another tech are discussing the relative merits of SCSI interf.docxYou and another tech are discussing the relative merits of SCSI interf.docx
You and another tech are discussing the relative merits of SCSI interf.docx
 
Write a program in C++ that will return 1 if the elements of an n-elem.docx
Write a program in C++ that will return 1 if the elements of an n-elem.docxWrite a program in C++ that will return 1 if the elements of an n-elem.docx
Write a program in C++ that will return 1 if the elements of an n-elem.docx
 
Write a java program that reads 10 integers from the keyboard and stor.docx
Write a java program that reads 10 integers from the keyboard and stor.docxWrite a java program that reads 10 integers from the keyboard and stor.docx
Write a java program that reads 10 integers from the keyboard and stor.docx
 
writing formulas for compounds chart Writing Formulas for Compounds Ch.docx
writing formulas for compounds chart Writing Formulas for Compounds Ch.docxwriting formulas for compounds chart Writing Formulas for Compounds Ch.docx
writing formulas for compounds chart Writing Formulas for Compounds Ch.docx
 
Write the expression as the logarithm of a single quantity- 1.docx
Write the expression as the logarithm of a single quantity-      1.docxWrite the expression as the logarithm of a single quantity-      1.docx
Write the expression as the logarithm of a single quantity- 1.docx
 
Write and implement a recursive version of the binary search algorithm.docx
Write and implement a recursive version of the binary search algorithm.docxWrite and implement a recursive version of the binary search algorithm.docx
Write and implement a recursive version of the binary search algorithm.docx
 
write a file declaration that holds text charaters and can be stored i.docx
write a file declaration that holds text charaters and can be stored i.docxwrite a file declaration that holds text charaters and can be stored i.docx
write a file declaration that holds text charaters and can be stored i.docx
 
Write a program that calculates the final value of a ten year- $10-000.docx
Write a program that calculates the final value of a ten year- $10-000.docxWrite a program that calculates the final value of a ten year- $10-000.docx
Write a program that calculates the final value of a ten year- $10-000.docx
 
Write the equation in the slope-intercept form- Solution.docx
Write the equation in the slope-intercept form-       Solution.docxWrite the equation in the slope-intercept form-       Solution.docx
Write the equation in the slope-intercept form- Solution.docx
 
Write the balanced neutralization reaction between H2S04 and KOH in aq.docx
Write the balanced neutralization reaction between H2S04 and KOH in aq.docxWrite the balanced neutralization reaction between H2S04 and KOH in aq.docx
Write the balanced neutralization reaction between H2S04 and KOH in aq.docx
 
Write an outline for the following research paper topic- Managerial Ac.docx
Write an outline for the following research paper topic- Managerial Ac.docxWrite an outline for the following research paper topic- Managerial Ac.docx
Write an outline for the following research paper topic- Managerial Ac.docx
 
write a vb program that uses a while loop that prompts a user to enter.docx
write a vb program that uses a while loop that prompts a user to enter.docxwrite a vb program that uses a while loop that prompts a user to enter.docx
write a vb program that uses a while loop that prompts a user to enter.docx
 
Write a temperature conversion program that converts from Fahrenheit t.docx
Write a temperature conversion program that converts from Fahrenheit t.docxWrite a temperature conversion program that converts from Fahrenheit t.docx
Write a temperature conversion program that converts from Fahrenheit t.docx
 
Write a function file in matlab that utilizes Eulers method to solve t.docx
Write a function file in matlab that utilizes Eulers method to solve t.docxWrite a function file in matlab that utilizes Eulers method to solve t.docx
Write a function file in matlab that utilizes Eulers method to solve t.docx
 

Último

Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 

Último (20)

Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 

Write a program in MATLAB to implement the algorithm of Gaussian Elimi.docx

  • 1. Write a program in MATLAB to implement the algorithm of Gaussian Elimination Method. Mandatory implementation steps Write a program in MATLAB to implement the algorithm of Gaussian Elimination Method. Mandatory implementation steps Solution function [A ] = GE(A) A = [1 9 4 5 ; -11 -2 3 0 ; 0 -6 5 4 ; 3 5 7 -3; ] n=4 [ cv Ir] = max(abs( A) ) % [ v I] = max(abs( A') ) [ rv Ic] = max(cv) row= Ir(Ic) temp = A(1, : ) A(1, : ) = A( row, :) A( row, :) = temp for i = 1:n-1 m = -A(i+1:n,i)/A(i,i); A(i+1:n,:) = A(i+1:n,:) + m*A(i,:); % b(i+1:n,:) = b(i+1:n,:) + m*b(i,:); end; A return