MATLAB: How to plot x(n) for many values of n

MATLABn values of x

How to plot ?(?) = ?? ?(0) for n=1-30 and x(0)=100?? I have tried this code, but it is repeating it's value again and again… What I am missing?
alpha = 2
x0 = 100; % Initial conditions
for n = 1:30
x(n) = (alpha^n)*(x0)
end
disp(x(n))

Best Answer

Shorter code eliminating loop:
Alpha = 2
x0 = 100; % Initial conditions
n = 1:30;
x = Alpha.^n*x0;
plot(n,x)
Note: You were doing it correctly all you had to use was disp(x)