Ozgur

78 Reputation

8 Badges

16 years, 162 days

MaplePrimes Activity


These are questions asked by Ozgur

I have not touched Maple in about 10 years and I'm back but apparently my Maple skills got quite a bit it rusty. I'm trying to plot a function but keep getting this warning and a blank graph:

"Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct"


Here is what I'm trying to do (put and call formulas for Black 76 model):

> with(Statistics);
> X := RandomVariable(Normal(0, 1));
> K := 150;
> r := 0.25e-1;
> s := .75;
> t := .5;
> d1 := f-> (log(f/K)+.5*s^2*t)/(s*sqrt(t)):

> d2 := f-> d1(f)-s*sqrt(t):
> c := f-> exp(-r*t)*(f*([CDF])(X, d1(f))-K*([CDF])(X, d2(f))) :
p := ->exp(-r*t)*(K*([CDF])(X, -d2(f))-f*([CDF])(X, -d1(f))):

All of the above work as intented:
> evalf(c(100)), evalf(p(100));

return the correct values. But I can't plot c( ) or p( ):

plot(c(f), f = 50 .. 100)

"Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct"

What am I doing wrong here? I will appreciate any help.

Thank you.

Hi all,

How can I plot, say, y1=x+4, 0<x<5 and y2=2x+1, 0<x<10 on the same plot area?

Thank you,

Ozgur

Hello everyone,

I need to create a 3d plot, but color the surface depending on the function's sign, say red for positive values, green for negative. How can I do that?


Thank you,

Ozgur

Hello everyone,

I need to write a procedure which takes a function as an input, differentiate it wrt x, multiply the result with x/y, and then evaluate the resulting function of (x,y) in a loop at different (x,y) pairs and return the results. 

I have a problem at the very first step though:

Suppose my function is

y := x->-(x-6)-0.01*(x-6)^3;

hence the new function I want to use in my procedure is

g := (x,y) -> diff(y(x),x)*x/y;

Hi everyone,

Here is a problem that I couldn't solve:

I've written a procedure to perform some tasks, and I want it to plot some results as output, in addition to the equations of those plots (I don't think the details of the procedure are necessary at this stage, but I'll be happy to provide if needed). My problem is: Each procedure can only plot a single picture. I know Maple can plot several graphs in one plot region, but is it possible to do the converse?

For example:

1 2 Page 1 of 2