"Matlab is skipping over my while loop and I do not know why."
Because you told it to.
Lets have a look at what values V and n have before the loop runs:
>> V
V = 0
>> n
n = 1
Now lets look at your loop condition... But first, is zero less than zero? (hint: no). We can check that using MATLAB too:
>> V(n)<V
ans = 0
Ergo your condition is not true, and the loop never runs. Because that is exactly what you told MATLAB to do.
