Publishing in MATLAB is currently limited to MATLAB code only (M-files that contain MATLAB functions or scripts).
Code from other languages can be included as basic text inserted and formatted with Markup, but there is no way to process and display output from function calls or objects. See the documentation page below for formatting options with Publishing Markup: