Matalb's publish function is imperfect. For example, when publishing table (build in Matlab object) it doesn't use HTML's table, but just does monotype plain text printing. On the other hand, if I write my own function, which outputs HTML code, it will be useless in Matlab command line.
Is it possible to write a function, which knows if it is inside publish, and behave differently?