Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   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
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.