Publicité

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

drosa1
29 Jan 2023
Write a program in MATLAB to implement the algorithm of Gaussian Elimi.docx
Write a program in MATLAB to implement the algorithm of Gaussian Elimi.docx
Prochain SlideShare
Write a SIMPLE java program to print out the numbers from 100 to 1- wi.docxWrite a SIMPLE java program to print out the numbers from 100 to 1- wi.docx
Chargement dans ... 3
1 sur 2
Publicité

Contenu connexe

Plus de drosa1(20)

Publicité

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
Publicité