Created
March 15, 2016 14:17
-
-
Save lorenrogers/07ee9049eab3aaf60738 to your computer and use it in GitHub Desktop.
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 characters
| 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment