Since you did not mention why the function is not working, it may have two reasons:
- Firstly, you need to save your function with its function name in your current directory and then call from command line like
and the above one worked for me.
-To be able to use convmass and convlength, you need to have Aerospace Toolbox license. If you do not have, please check it.
Hope this helps.