Linear Algebra Matlab matrix loop?

92 Views Asked by At

I'm new to both linear algebra and Matlab, so naturally I'm probably asking an obvious question. If someone could attempt to explain to me in layman's terms how to go about answering this question in Matlab it'd be great, thanks in advance.

Question

1

There are 1 best solutions below

7
On

Loops are for suckers.

function x_new = matrix_recursion(A, endp, x_start) if (endp == 0) x_new = x_start else x_new = matrix_recursion(A, endp-1, A*x_start); end

I don't have MatLab on this computer so I can't test it, but it should work fine.