Assuming a
is a matrix and b
is a vector, you can use the backslash operator to solve for x
:
main.m11 chars2 lines
If you have multiple values of b
that you want to solve for, you can use a loop:
main.m83 chars6 lines
This will result in a matrix x
where each column is the solution for the corresponding column of b
.
gistlibby LogSnag