%% Set the InitPort Property for a Portfolio Object
% Given an initial portfolio in x0, use the setInitPort function to set the InitPort property.

p = Portfolio('NumAssets', 4);
x0 = [ 0.3; 0.2; 0.2; 0.0 ];
p = setInitPort(p, x0);
disp(p.InitPort);

% Copyright 2015 The MathWorks, Inc.