Recursion - Fun - MATLAB Cody - MATLAB Central

Problem 42647. Recursion - Fun

Difficulty:Rate
Generate the first k terms in the sequence a(n) define recursively by
a(n+1)=p*a(n)+(1+a(n)) with p=0.9 and a(1)=0.5
Test Case
n = 2;
a = [a(1) a(2)] = [0.5000 1.9500]

Solution Stats

21.2% Correct | 78.8% Incorrect
Last Solution submitted on Aug 03, 2024

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
13
5

Problem Recent Solvers39

Suggested Problems

More from this Author3

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page