https://jp.mathworks.com/help/finance/portfolio.setassetmoments.html
setAssetMoments - Set moments (mean and covariance) of asset returns for Portfolio object - MATLAB
This MATLAB function obtains mean and covariance of asset returns for a Portfolio object.