I'm afraid the question doesn't make sense to me, perhaps it could be better explained? I'll still try and answer.
Even putting in arithmetic operators call matlab functions. You have to use some matlab functions if you are coding in Matlab.
Maybe you want to call a routine in another language? I have used Matlab to send command to other platforms (Java and Labview) and for the type of connection you need there will be matlab code that allows you to pass strings written in that other platform that can execute code there. Typically the solution can be found in Mathworks forums or places like stack overflow.
To compare output, you create a plain text file then use the platform of your choice to compare the Matlab output with output from other sources. How exactly will depend on the platform you are using. Remember to allow for the accuracy limit of your machine when comparing equivalence (this will also be platform dependent).