Decreasing scale on graphs
Ältere Kommentare anzeigen
I wish to graph Time Decay for an option price from 1 year to almost 1 day. The graph generated by MATLAB scales from 0 to 1 and I need 1 to 0.
Interval = 1/252;
Times = 1:-Interval:Interval;
[TDCall TDPut] = blsdelta(S0,K,r,Times,Sigma);
plot(Times,TDCall);
Antworten (3)
Walter Roberson
am 11 Mär. 2011
Okay, this is going to be a hack, but it'll get the job done for now:
plot(-Times,TDcall);
set(gca, 'XTickLabel', -get(gca, 'XTick'))
Tested, and it works.
3 Kommentare
Jan
am 11 Mär. 2011
But it fails at zooming.
Walter Roberson
am 12 Mär. 2011
True, and surmountable using known methods.
Good enough for someone who was falling asleep at the time.
David
am 13 Mär. 2011
Ned Gulley
am 11 Mär. 2011
Is this what you're looking for?
plot(Times,TDCall)
set(gca,'XDir','reverse')
1 Kommentar
David
am 13 Mär. 2011
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!