Last active
August 29, 2015 14:08
-
-
Save davidavdav/e04f7f34b78c22dbe1cc to your computer and use it in GitHub Desktop.
This file contains 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
## make matrix symmetric by copying the upper triangle into the lower | |
## this should exist somewhere... | |
function symm!(m::Matrix) | |
for i=1:size(m,1) | |
for j=i+1:size(m,2) | |
m[j,i] = m[i,j] | |
end | |
end | |
m | |
end | |
## y = x[i,:]' | |
function rvec!(y::Array, x::Matrix, i::Int) | |
for j=1:size(x,2) | |
y[j] = x[i,j] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment