Skip to content

Instantly share code, notes, and snippets.

@dapperfu
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dapperfu/9465882 to your computer and use it in GitHub Desktop.
Save dapperfu/9465882 to your computer and use it in GitHub Desktop.
%%
n=1e4;
tic
x=rand(n,n);
y=rand(n,n);
toc
tic
for i=1:n
for j=1:n
z3(i,j)=sqrt(x(i,j)^2+y(i,j)^2);
end
end
toc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment