Decreasing scale on graphs

3 visualizaciones (últimos 30 días)
David
David el 11 de Mzo. de 2011
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);

Respuestas (3)

Jan
Jan el 11 de Mzo. de 2011
Can you change the values of the time?
plot(1 - Times, TDCall);
Perhaps FLIPLR is wanted to reorder TDCall?
  1 comentario
David
David el 13 de Mzo. de 2011
Thanks for your help.

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 11 de Mzo. de 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 comentarios
Walter Roberson
Walter Roberson el 12 de Mzo. de 2011
True, and surmountable using known methods.
Good enough for someone who was falling asleep at the time.
David
David el 13 de Mzo. de 2011
Thanks for your help.

Iniciar sesión para comentar.


Ned Gulley
Ned Gulley el 11 de Mzo. de 2011
Is this what you're looking for?
plot(Times,TDCall)
set(gca,'XDir','reverse')
  1 comentario
David
David el 13 de Mzo. de 2011
Thanks for your help.

Iniciar sesión para comentar.

Categorías

Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by