I am trying to perform a manual computation of gradient descent, but having trouble with the for loop in storing the output as a vector (2x1 in this case).
With my inputs:
I have set up this for loop:
a(1) = a0 -c * M' * (M* a0 -f)
a(k) = a(k-1) - c * M' * (M * a(k-1) - f);
Unfortunately, I'm seeing `Unable to perform assignment because the left and right sides have a different number
I've verified that the output of the single-case computation a = a0 - c * M' * (M* a0 -f) is [a1;a2]. This is correct.
My question is how one stores an 'a1, a2' vector as the loop continuously iterates and updates the 'a1, a2' ?