MATLAB: How to set time for script to execute a function

I want to execute a function after 10 seconds,how will i wrrite that,,,have to write using timer?

Best Answer

A timer is the best solution:
TimerH = timer('TimerFcn', @yourFunction, 'StartDelay', 10, ...
'ExecutionMode', 'singleShot');
start(TimerH);
Consider, that the timer function needs two inputs:
function yourFunction(TimerH, EventData)
...