Advertisement
Guest User

Untitled

a guest
Feb 16th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.15 KB | None | 0 0
  1. Fn_2=0;
  2. Fn_1=1;
  3. n=1;
  4. disp('F0=0')
  5. disp('F1=1')
  6.  
  7. while n<49
  8. n=n+1;
  9. F_n=Fn_2+Fn_1;
  10. disp(['F' num2str(n) '=' num2str(F_n)])
  11. Fn_2=Fn_1;
  12. Fn_1=F_n;
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement