Fibonacci.m

Given an integer n, return the nth Fibonacci number.

You are now following this Submission

Given an integer n, return the nth Fibonacci number.

Cite As

David Terr (2026). Fibonacci.m (https://www.mathworks.com/matlabcentral/fileexchange/5093-fibonacci-m), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: Fibonacci sequence, vectorized fibonacci

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

I fixed the input checking.