Your question is ill-defined.
Monte-Carlo simulations simply mean perform your simulation with varying inputs such that the inputs are chosen randomly. Better MC simulations use prior information / simulations to pick the next iteration.
Here is an example - given an input, the method passes if it is greater than 0.5, fails if it is less than or equal to 0.5.
function out = Test(in)
out = (in>0.5);
And to test it:
MCSim = arrayfun(@(inputs) Test(inputs), rand(100,1));