you can use this to create a column vector since you just need to define that there is only one column
x(1:n,1) = 20;
but another, more elegant way is
x = ones(n,1) * 20;
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!