Maximum Likelihood Contour Plot Calculation
No License
This contribution is made in order to calculate the maximum likelihood contour plots of any function. Just replace the <<fcnObjfun>> file with your function change some basic settings in the <<Example>> file and there you go. The objective function has to return a scalar. There are two settings only: the range of the parameter to be varied around the base case value [%] and the resolution of this range [%].
Additional parameters of the objective function can be passed in the form of a vector or structure. I provided also some results of this contribution, the JPEG files.
EXAMPLE ==============================
% base case coefficients
BCcoeff = [ -2 4 -6 8];
% set the sensitivity range in %: e.g 30% around base case value
settings.Range = 30;
% sensitivity grid resolution
settings.step = 1;
% contour plot setting
settings.CplotRange = [ 50:2:100];
% additional parameter vector = []
param =[];
% call function to calculate matrix Z
outStr = fcnSensitivityRun_3D('fcnObjfun', BCcoeff, settings, param)
% call function fcnMLPlot(outStr) to %plot the results
% it was split in two functions because the calculation of matrix Z can
% take long time, e.g. for ODE systems %and if you want to change the
% contour plot settings then you dont %need to recalculate Z.
% for e.g. you can change again the contour plots setting
%
outStr.setts.CplotRange = [ 20:10:100];
fcnMLPlot(outStr)
Additional toolboxes needed: Communications TBX, vec2mat function.
Tested on R14SP3.
Ver.1.0.
14.10.2005
This library is free to use and modify for non-commercial purposes.
Cite As
Levente Simon (2024). Maximum Likelihood Contour Plot Calculation (https://www.mathworks.com/matlabcentral/fileexchange/8726-maximum-likelihood-contour-plot-calculation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Contour Plots >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | Category changed to statistics and probaility. |