Skip to content
Snippets Groups Projects
Commit 2a3b3af4 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

octave: vectorise code (speed gain: 20x)

parent 4ce715ea
No related branches found
No related tags found
No related merge requests found
...@@ -13,11 +13,8 @@ ylabel('y') ...@@ -13,11 +13,8 @@ ylabel('y')
tic tic
for i=1:length(y) for i=1:length(y)
a = zeros(2,length(x)); in = [ X(i,:); Y(i,:) ];
for j=1:length(x) f(i,:) = duneevaluate(in);
a(:,j) = [ X(i,j); Y(i,j) ];
end
f(i,:) = duneevaluate(a);
end end
clear X Y; clear X Y;
toc toc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment