by phkahler · 6y ago · 0 comments
Please Rust, please!
u=rand(5) % 5-by-5 matrix
v=rand(5,5,5,5,5,5) % 6-dimensional matrix, each dimension 5 long
v2=v(1,2,3,:,:) % 1-by-1-by-1-by-5-by-5 matrix
w=u(:,3) % take every line in the third column, so that's a vertical 5-by-1 vector
x=5*w*w' % matrix multiplication of w and its transpose, times a scalar
y=rand(5).*x % element-wise multiplicationhttps://docs.microsoft.com/en-us/dotnet/api/system.numerics....