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.