Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %%%This is for part a for problem 1.
- A=zeros(8,8);
- for j=1:8
- for k=1:8
- if j==k
- A(j,k)=-2;
- end
- if abs(j-k)==1
- A(j,k)=1;
- end
- end
- end
- [L,U]=lu(A) %%%Proving L and U.
- L*U %%%Proving that L*U=A, thus it is correct.
- %%% This is for part b for problem 1.
- det(U)
- det(A)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement