Drawing solutions
Show older comments
Hi
For a couple of months I have been struggling with the same problem. The problem is that I would like to draw the following restrictions:
D(2.7,1,1,0.3)=D(c,delta,xT,0.2)
S(2.7,1,1,0.3)<S(c,delta,xT,0.2)
where S is found with the following
function S0 = S0Func(obj, c, delta, xT, sigma)
beta = obj.betaFunc(sigma);
xb = obj.xbFunc(c, delta, sigma);
S0 = (1-obj.tau).*(obj.x0./(obj.r-obj.mu)-c./obj.r-(xb./(obj.r-obj.mu)-c./obj.r).*((obj.x0./xb).^beta)-((delta-1).*c./obj.r).*((obj.x0./xT).^beta-((obj.x0./xb).^beta)));
end
and D is found with the follwing
function D0 = D0Func(obj, c, delta, xT, sigma)
beta = obj.betaFunc(sigma);
xb = obj.xbFunc(c, delta, sigma);
L = obj.LFunc(xb);
D0 = c./obj.r+(L-c./obj.r).*((obj.x0./xb).^beta)+((delta-1).*c./obj.r).*((obj.x0./xT).^beta-((obj.x0./xb).^beta));
end
Please write if you would like the complete code.
Furthermore I have some restrictions which has to be fulfilled.
- delta > 1
- c > 0
- 1>xT>xb
I can draw the functions without the restrictions using
[xT, delta, c] = meshgrid(0.8:.01:1, 1:.1:3, 0:.1:4);
values = calc.S0Func(optimalStraightCoupon,1, 1, calc.sigmaH)- calc.S0Func(c,delta, xT, calc.sigmaL);
patch(isosurface(-xT, -c, -delta, values, 1), 'FaceColor', 'red');
view(3);
What I would like to do is draw the values of c, delta, xT, which solve this problem and in the same time maximizes the S function.
I am a bit frustrated as I have been spending a lot of time on the project and I need to get this right.
Any help is very appreciated.
Answers (0)
Categories
Find more on Scalar Volume Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!