2. Create a code for LU Decomposition using Doolittle's Method by modifying the %???????????????? portions of the code below: ( function X = lu_doolittle (A,B) %Honor Pledge... n = length(A); Y = zeros(n,1); X = zeros(n,1); [L,U] = doolittle (A); %forward substitution LY = B Y(1) B(1)/L(1,1); for row = 2:n end Y(row)= B(row)/L(row, row); for k=1:row-1 Y(row) = Y(row) (1/L(row, row)) *L(row, k) *Y(k); end

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
2. Create a code for LU Decomposition using Doolittle's Method by modifying
%???????????????? portions of the code below: (
the
function X = lu_doolittle (A,B)
%Honor Pledge.....
n = length(A);
Y = zeros(n,1);
X = zeros(n,1);
[L,U] = doolittle (A);
%forward substitution LY = B
Y(1) B(1)/L(1,1);
for row = 2:n
end
%backward substitution UX = Y
X(n) = Y(n)/U(n,n);
end
end
Y(row) = B(row)/L(row, row);
for k = 1:row-1
Y(row) = Y(row) (1/L(row, row))*L(row,k) *Y(k);
for rown-1:-1:1
end
end
end
X(row) = Y(row)/U(row, row);
function [L,U] = doolittle (A)
n = length(A);
L = zeros(n);
U = zeros(n);
for k= row+1:n
X(row) = X(row) - (1/U(row, row)) *U(row,k)*X(k);
end
for row = 1:n
U(row, row) = 1;
for col= 1:n
end
if row >= col
L(row, col) %?????? 22222222;
for k=1:col-1
L(row, col) = %??
end
elseif row col
U(row, col)
for k = 1:row-1
end
end
%???????
U(row, col) %??????????
??;
Transcribed Image Text:2. Create a code for LU Decomposition using Doolittle's Method by modifying %???????????????? portions of the code below: ( the function X = lu_doolittle (A,B) %Honor Pledge..... n = length(A); Y = zeros(n,1); X = zeros(n,1); [L,U] = doolittle (A); %forward substitution LY = B Y(1) B(1)/L(1,1); for row = 2:n end %backward substitution UX = Y X(n) = Y(n)/U(n,n); end end Y(row) = B(row)/L(row, row); for k = 1:row-1 Y(row) = Y(row) (1/L(row, row))*L(row,k) *Y(k); for rown-1:-1:1 end end end X(row) = Y(row)/U(row, row); function [L,U] = doolittle (A) n = length(A); L = zeros(n); U = zeros(n); for k= row+1:n X(row) = X(row) - (1/U(row, row)) *U(row,k)*X(k); end for row = 1:n U(row, row) = 1; for col= 1:n end if row >= col L(row, col) %?????? 22222222; for k=1:col-1 L(row, col) = %?? end elseif row col U(row, col) for k = 1:row-1 end end %??????? U(row, col) %?????????? ??;
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Introduction to Template
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education