MATLAB: How to put all values from for loop into one vector

for loop plot

Greetings,
As writen above i would like to be able to plot values of 'u'that comes out from for loop so i need somehow to put them in a form of a vector or whatever form suits the best.but cant figure out the code for that. my code:
umax=0.54; M=-4.2703; D=1.8;
for y=0:.1:1.8;
u=umax/M*log(1+(exp(M)-1)*(y/D)*exp(1-y/D))
end
disp(u)
tyvm in advance.

Best Answer

Y = 0:.1:1.8;
n = length(Y);
u = zeros(n,1);
for k=1:n;
u(k)=umax/M*log(1+(exp(M)-1)*(y(k)/D)*exp(1-y(k)/D))
end