This function behaves like subplot, but sets figure margins to zero and leaves no space between subplots unless requested by the user. This is similar to other submissions on FEX including tight subplot and subaxis. Those are good functions, so be sure to check them out. In reviewing subaxis and tight subplot it looks like they may offer more options for spacing, but this one might be a little simpler to use. Try 'em all and see what works best for you.
The name smplot comes from Edward Tufte's small multiples.