Gaussian Elimination Confusion about the specs
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Im confused about what the project is saying. It says the following: enter image description here

I did the #1 but in #2 where do I have to plug Aij = cos(...) in inside the code? I have the code but have no clue where I should plug the given entry Aij in. Any help would be appreciated! Thanks!
Code
n=8;
for i=1:n
for j=1:n
a(i,j)=1/(i+j-1);
end
end
c=ones(n,1);
b=a*c;
aorig=a;borig=b;
%Elimination
for i=1:n-1
for j=i+1:n
m=a(j,i)/a(i,i);
for k=i:n
a(j,k)=a(j,k)-m*a(i,k);
end
b(j)=b(j)-m*b(i);
end
end
%Back substitution
for i=n:-1:1
for j=i+1:n
b(i)=b(i)-a(i,j)*x(j);
end
x(i)=b(i)/a(i,i);
end
x'
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!