No, subfunctions in scripts are not allowed.
This has been discussed repeatedly. See:
- want-to-have-m-function-in-m-script
- do-not-want-to-have-m-function-in-m-script
- don-t-care-to-have-m-function-in-m-script
[EDITED] Since R2016b you can define subfunctions in scripts also: https://www.mathworks.com/help/matlab/matlab_prog/local-functions-in-scripts.html