Hi! i have a error in example file.

what i can do ? to fix this error?

1 件のコメント

Geoff Hayes
Geoff Hayes 2019 年 3 月 2 日
Max - what is infoRatioTargetReturn? Is this a function of that you have written or is it from somewhere else?

サインインしてコメントする。

 採用された回答

Cris LaPierre
Cris LaPierre 2019 年 3 月 2 日
編集済み: Cris LaPierre 2019 年 3 月 2 日

1 投票

You are trying to call a function that is not in your current folder nor on your path.
It looks like this is the example you are trying to use:
openExample('finance/PortfolioOptimizationBenchmarkExample')
Note that the function called by this script is included in-file at the botton.
function [infoRatio,wts] = infoRatioTargetReturn(targetReturn,portObj)
% Calculate information ratio for a target-return portfolio along the
% efficient frontier
wts = estimateFrontierByReturn(portObj,targetReturn);
portRiskAct = estimatePortRisk(portObj,wts);
infoRatio = targetReturn/portRiskAct;
end
You would need to create an m-file function for this function if you want to run this example from the command window. Better to just open the live script example and run it in the editor.

1 件のコメント

Max Fog
Max Fog 2019 年 3 月 2 日
Thanks for You attantion.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeWorkspace Variables and MAT Files についてさらに検索

タグ

質問済み:

2019 年 3 月 2 日

編集済み:

2019 年 3 月 2 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by