Skip to content

Instantly share code, notes, and snippets.

@teburd
Last active October 2, 2017 17:32
Show Gist options
  • Save teburd/02f259e18e176cb0abcb4022c64198c1 to your computer and use it in GitHub Desktop.
Save teburd/02f259e18e176cb0abcb4022c64198c1 to your computer and use it in GitHub Desktop.
what I want to vectorize
>> A
A =
1 2
3 4
5 6
7 8
>> B
B =
1 3 5 7
2 4 6 8
>> C
C =
0 0 0 0
>> for c = 1:4
C(c) = A(c,:)*B(:,c);
endfor
>> C
C =
5 25 61 113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment