File Exchange

image thumbnail

GeneralizedFibonacc​i.m

version 1.0 (1.47 KB) by

GeneralizedFibonacci(n,a,b) returns the generalized Fibonacci number.

1 Download

Updated

No License

For fixed integers a and b with D = a^2 + 4*b positive, the sequence U_n = GeneralizedFibonacci(n,a,b) satisfies the recurrence U_n = a U_{n-1} + b U_{n-2} with initial conditions U_0 = 0 and U_1 = 1. If a=b=1, this is the Fibonacci sequence.

Comments and Ratings (1)

Srikanth Akkiraju

MATLAB Release
MATLAB 6.0 (R12)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video