image thumbnail
from Getting Started with Parallel Computing using MATLAB by Arjav Chakravarti
This is an older version of the introductory tutorial for running parallel MATLAB applications

submitJob3b.m
% This script submits a job with 3 tasks 
sched = findResource();
job3b = createJob(sched,'FileDependencies',{'testTask.m'}); 
createTask(job3b, @testTask, 1, {1,1});
createTask(job3b, @testTask, 1, {2,2});
createTask(job3b, @testTask, 1, {3,3});
submit(job3b)
waitForState(job3b, 'finished') % optional 
sprintf('Finished Running Job') 
results = getAllOutputArguments(job3b);
sprintf('Got Output Arguments')
destroy(job3b) % permanently removes job data
sprintf('Test Completed')

Contact us at files@mathworks.com