Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Operation count for Choleski factorization and Guass elimination
Replies: 2   Last Post: Apr 19, 2013 5:00 PM

 Messages: [ Previous | Next ]
 Nancy Posts: 2 Registered: 4/18/13
Operation count for Choleski factorization and Guass elimination
Posted: Apr 18, 2013 8:55 PM

Hi, I'm having a lot of trouble finding the multiplication and division operation count for Choleski factorization (without pivoting) and the Gauss elimination.

I had a go at the Choleski factorization, but seem to be getting a lot of errors such as "The expression to the left of the equals sign is not a valid target for an assignment" and a variable is undefined:

function [count] = Chol(j,k,i)

for n=2:50;
for j=1:n;
for k=1:j-1;
for i=j:n;
d = size(a);
[n,n] = size(a);
[d1,d2,d3,...,dn] = size(X);
a(j:n,j) = a(j:n,j)-a(j:n,1:j-1)*.a(j,1:j-1);
end
end
a(j,j)=sqrt(a(j,j));
for k=j+1:n;
a(j+1:n,j) = a(j+1:n)/a(j,j);
count = n^3/3+n^2-1/n;
end
end
end

I'm not sure if I'm on the right track.
Any help will be appreciated.

Thank you.

Date Subject Author
4/18/13 Nancy
4/19/13 Steven Lord
4/19/13 Nancy