How is it not working?

No change?

Do you have a line like
myArray(x)=f
after the line?

Otherwise I need to see actual string.