To compute the row space of a matrix A
in MATLAB, we can use the rref
function and extract the rows with pivot columns as they form a basis for the row space. The following code demonstrates this:
324 chars16 lines
The output should be:
main.m42 chars4 lines
This means that every row of A
can be written as a linear combination of the rows of rowSpaceA
.
gistlibby LogSnag