Hi, I'm trying to vectorize the following code:
for i=3:6 for j=i:6 howmuch = howmuch + factorial(j) / factorial(j - i); end end
I tried the meshgrid approach, however couldn't find a way to connect "j to i". How can I do this?
Thanks!
for loopnestedvectorization
for i=3:6 for j=i:6 howmuch = howmuch + factorial(j) / factorial(j - i); end end
Best Answer