MATLAB: Calculate an expression in MAtlab

MATLAB

(Sorry i don't know a better title)
I have (n=0,1,2,3,….)
How can I calculate the below expression with matlab codes ?
Thank you

Best Answer

It depends on what ‘T’ and ‘c’ are.
If they are scalars, this would likely work:
T = rand;
c = rand;
x(1) = rand;
N = 10;
for k = 1:N
x(k+1) = x(k)*T+c;
end
Related Question