i agree with john, albeit the author might consider a slightly different approach for the engine, which works even if one or both inputs is/are :
% a few error checks...
% a final row/col-vec check
just a thought
I like this code, alhough I'll admit I've never had a need for what it does. It fills a niche in Matlab.
Its well written, internally commented, good error checking, good help, an H1 line, an example of use, no mlint flags, and it is vectorized. I can't ask for much more.
Only one comment. The code returns an error if either x or y is empty. But why not just return y if x is empty, or x if y is empty? This would seem to be consistent and appropriate.