I cannot use double subscripts, 2d arrays, or nested for loops for this problem.
ID: 3829617 • Letter: I
Question
I cannot use double subscripts, 2d arrays, or nested for loops for this problem. Here is the algorithm I have come up with so far:
L0[1] = sqrt(a[1]);
L1[1] = 1 / L0[1];
L2[1] = b[1] / L0[1];
L0[2] = sqrt(a[2] - (L1[1] / L0[1]) * (L1[1] / L0[1]));
L1[2] = (0 - (L2[1]) * (L1[1])) / L0[2];
L0[3] = sqrt(a[3] - (L2[1]) * (L2[1]) - (L1[2]) * (L1[2]));
for(i = 3; i <= n; i++)
{
L2[i-2] = (b[i-2] - b[i-3] * b[i-4]) / b[i-2];
L1[i-1] = (L0[i] - (L2[i]) * (L1[i])) / L0[i];
L0[i] = sqrt(L0[i] - (L1[i]) * (L1[i]) - (L2[i]) * (L2[i]));
}
I'm not sure what to add or change in this solution. Can someone help me fix this solution?
1) Let A be a symmetric pentadiagonal positive definite matrix of the form Cal 1 0 0 0 a, 0 bo 0 a 0 ba 0 0 2 0 b 0 bn 0 an n-4 m-2 0 b am-1 an n-2 Write an algorithm that generates a lower-triangular L such that A -LL'. That is, construct the vectors LO, LI, L2 so that LO L1 LO 0 L2 L1 LO 0 0 L2 LO L1 n-2 Use the given single subscripting and fully exploit the sparsity pattern. Assume that n 23. Hint: The number of special cases can be reduced by working one row at a time.Explanation / Answer
Every square matrix can be decomposed into a product of a lower triangular matrix {L} and a upper triangular matrix {U}, as described in LU decomposition for matlab using crout's matrix algorithm.
in c -
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.