Code covered by the BSD License  

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

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

by

 

12 Sep 2008 (Updated )

code exercises for M11 tutorial at SC08

Demo1_plot_optim(fig, risk, returns)
function Demo1_plot_optim(fig, risk, returns)
%PCTDEMO_PLOT_OPTIM Create the graphs for the Parallel Computing Toolbox 
%Portfolio Optimization demos.
%   pctdemo_plot_optim(fig, risk, returns) plots the effective frontier given
%   by the risk and the returns vectors.  The graph is shown in the figure fig.

%   Copyright 2007 The MathWorks, Inc.
%   $Revision: 1.1.6.1 $  $Date: 2007/11/09 20:05:35 $
    
    if ~ishandle(fig)
        % The user closed the figure.
        return;
    end
    clf(fig);
    set(fig, 'Visible', 'on');
    figure(fig);
    ax = axes('parent', fig);

    plot(ax, risk, returns, 'o-');
    xlabel(ax, 'Risk');
    ylabel(ax, 'Expected returns');
    title(ax, 'The efficient frontier');
end % End of pctdemo_plot_optim.

Contact us