Skip to content

Instantly share code, notes, and snippets.

@apow2
Created January 11, 2021 10:15
Show Gist options
  • Select an option

  • Save apow2/6a71a2663d91591d159426fd0bbe5175 to your computer and use it in GitHub Desktop.

Select an option

Save apow2/6a71a2663d91591d159426fd0bbe5175 to your computer and use it in GitHub Desktop.
x = [1, 1];
for k = 3:1000000
x(k) = x(k-1) + x(k-2);
end
x = zeros(1000000, 1); x(1:2) = [1, 1]
for k = 3:1000000
x(k) = x(k-1) + x(k-2);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment