You should call the function as followed:
> [z,a]=complx(numb)
If you call the function just:
complx(numb)
then it returns only the first output, z.
You should call the function as followed:
> [z,a]=complx(numb)
If you call the function just:
complx(numb)
then it returns only the first output, z.