MATLAB: Changing variable after each loop iteration

homeworkinputvariablewhile loop

Will it be possible to change the variable or assign an new variable after each loop iteration
a=9
while a>0
a=input('Example')
end
I don't want to collect it in an array.
Thank you

Best Answer

In my opinion that's ridiculous. Collect it in an array - the whole rest of the world does it, so why can't you? Anyway, your code does change the variable value, just not its name.