I have written a MATLAB function which can send an e-mail. I can call this function from the command prompt, using the following command:
"C:\Program Files\MATLAB\R2017a\bin\matlab.exe" -r "nameofthefunction;"
When I do this, the MATLAB application opens, and then the function is executed. What I want to do is write a command which would trigger the function (i.e send the e-mail), without opening the MATLAB application.