Created
March 15, 2016 14:17
-
-
Save lorenrogers/07ee9049eab3aaf60738 to your computer and use it in GitHub Desktop.
Revisions
-
Loren Rogers created this gist
Mar 15, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ function output = FindBasis(A) %find the number of times to loop through the array (height) [height width] = size(A); %set up temp var tmp = A(1,:) %loop through all the vectors we are potentially going to add on for i=2:height if rank([tmp;A(i,:)]) > rank(tmp) tmp = [tmp;A(i,:)] end end output = tmp