Hello Paul,
I took a look at your VI and received the same error as you. After further inspection I noticed that the variable "in" was lowercase in the script and had an uppercase "I" in the input. MATLAB scripts are case sensitive and as such, we need to make sure that both variables and inputs match.
Regards,
Matt F