First, when I tried to use mcc -m test.m I got error
dyld: Library not loaded: ../../bin/maci/libmwcompiler.dylib
Referenced from: /Applications/MATLAB74/bin/maci/mcc
Reason: image not found
Trace/BPT trap
To repair it I indicated paths to missing libraries
export DYLD_LIBRARY_PATH="/Applications/MATLAB74/bin/maci:/Applications/MATLAB74/sys/os/maci"
This worked. I was able to compile my file, and run it from console as an executable.