There's only one value because your code is working as follows:
Matlab is not told where to store the data inside A, so A(1) just gets changed each time the loop iterates. You need to use the loop variable, ii, to indicate the index position in A where you would like to store data for the current iteration.
Let's try this again:
We can do better though; it's important to preallocate the space to your variable when it's possible to do so: