MATLAB: Publish a Function which has Input Arguments

publish

Hi Everyone, I am calling a function with three input arguments and I want to publish this function. The name of my function is myfunc(x,y,z). I know that my function can be published using the command publish('myfunc.m'), but i am unable to enter the input arguments using this publish command. I cannot declare these input arguments globally as it can cause other problems in my script. Can anybody please tell me how to publish a function which has input arguments ?
P.S. Note : I tried using save2pdf, export_fig, etc. to convert my figures to pdf format, but in vain as its illegal to use ghostscript in a professional environment without a commercial licence. Any kind of help would be much appreciated. Steve

Best Answer

Take a look at the codeToEvaluate option for the publish function.