This is because your code as stated will only output a single value for variable 'p';
This is because of how you initialised the variable 'u'.
u=0.1:1;
u % u is assigned a value of 0.1.
I assume you were trying to initialise u as a vector between 0.1 and 1, with increments of 0.1. You can do it as follows
u = 0.1:0.1:1;
u