MATLAB: Run an M-file multiple times

mfilemultiple

I have created an M-file which gives me random stuff using random numbers. I want to run this file 1000 times. How do I do this without having to press F5 1000 times?

Best Answer

for ii=1:1000
your_m_file_name %the .m is not necessary
end
Provided you are in the directory your m-file resides in, or that it is located in Matlab's path.