Lucas.m

Given a nonnegative integer n, return the nth Lucas number.

You are now following this Submission

Given a nonnegative integer n, return the nth Lucas number. Return an error message if the argument is not an integer.

Cite As

David Terr (2026). Lucas.m (https://www.mathworks.com/matlabcentral/fileexchange/5094-lucas-m), MATLAB Central File Exchange. Retrieved .

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 a warning bug by eliminating the final end statement.