Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Options  Derivatives
Posted:
Jan 18, 2013 11:15 PM


"Pallav Mishra" wrote in message <kdd57c$d79$1@newscl01ah.mathworks.com>... > I am trying to plot an intrinsic value of a call option, which is max(SK,0), with > strike $50, and stock price changes from $0.01 to 100..wanted to know how to do this right, because its throwing an error. Its obvious that plot (x,y) should have x and y of the same length: > > >> plot( 0.01:0.01:100, max(0.01:0.01:(10050),0),'b') > > > Error using plot > Vectors must be the same lengths.           I am guessing you want this:
x = 0.01:0.01:100; y = max(50x,0); plot(x,y)
Roger Stafford



