MATLAB: I have problems with the financial toolbox, It does not recognize the function displayportfolio

financial

displayPortfolio(sprintf('Portfolio with %g%% Target Return', 100*TargetReturn), aBlotter, false);
Undefined function or variable 'displayportfolio'.

Best Answer

If you're referring to this example, the utility function displayPortfolio is defined at the end of the live script. Because it is defined inside the live script, it is only available to the code inside the live script.