I looks like this is a script. Then is shares the workspace variables with its caller. I guess, that you have created an array called "real" anywhere. Then real(Io) does not call the function real(), but uses the values of Io as indices.
Check this by:
Using function avoids such confusions, because you can check the local code, if a variable with such a name is created.
Avoid using names of builtin functions for variables.