In the MATLAB Terms of Use, Mathworks explicitly disclaims having any rights to source code you wrote yourself using MATLAB or related products. You (or employer) have rights to all creative contributions you originate.
In return for paying for an authorized copy of MATLAB Compiler or MATLAB Coder, Mathworks licenses use of their library and technologies to you, with you having the right to distribute the compiled code for whatever fee you choose -- whether that be no cost, or minimal cost, or full commercial product pricing. Some restrictions may apply (USA export control laws must be satisfied.)
If you, for example, want to create a function with a prototype plot(X,Y) that creates a graph based on two vectors (X and Y) but don't use any Mathworks source or libraries to do so, then it is your own original work and you can do with it as you please.