It sounds like you're in the "Commands" portion of the mobile application (you'll see the ">>" to the left). This acts just like the Command Window in MATLAB Desktop and Online versions. If you would like to create a script or function, hit the "Commands" button in the top left (at least on Android) and select "Files" from the drop-down. This will allow you to create or edit M files.
Make sure your MATLAB Mobile app is fully-updated. Older versions of the app did not have the capability to edit files.