You are not updating H(i+1) in your while loop.
This line creates an array named "H" of size [1, 1] which has one value "Hs". In your loop, you are not doing anything to the array which would increase the size of "H".
I don't know what you are trying to do with the code but I am guessing you might want to do
This will increase the size of your array and the loop would run till H(i) > Hs.
Best Answer