Code covered by the BSD License  

Highlights from
Enhancing e-Infrastructures with Advanced Technical Computing: Parallel MATLAB® on the Grid

Demo6_batchPortfolioOptim.m
%%
clear all

%% Submitting a Script that Uses Parfor

job=batch('Demo6_task_optim_script','matlabpool',2, 'Configuration', defaultParallelConfig());

%% Wait and Load Results from Worker's Workspace

wait(job);
load(job);

%% Plot the final results

fig2 = figure;
Demo6_plot_optim(fig2, risk, ret);

%% Destroy job

destroy(job);

Contact us at files@mathworks.com