You can solve for the column vector x
in MATLAB using the backslash operator \
. You can also use the linsolve
function. Here's how to do it using both methods:
Using the Backslash Operator:
main.m66 chars5 lines
Using the linsolve
Function:
main.m75 chars5 lines
Both of these methods give you the same output:
main.m33 chars4 lines
So the solution is x = [0.2727; -0.1818; -0.5455]
.
gistlibby LogSnag