Student Support Forum: 'Problem with Plot' topicStudent Support Forum > General > Archives > "Problem with Plot"

 Next Comment > Help | Reply To Topic
 Author Comment/Response Thibault 05/23/13 04:20am Hi all, My problem is the following. I define different functions: Eta, A, B, P and DR but when I plot DR (which depend of Eta,A, B and P) I obtain just the axes of my function. Here is my different functions: Clear[A, B, P, DR, Alpha, Gamma, Sigma]; Eta[Alpha_, Sigma_]:= Sqrt[Alpha^2 + Sigma^2]; A[Alpha_, Gamma_, Sigma_, t_,T_] := ((2*Eta[Alpha,Sigma]*(Exp[(Alpha + Eta[Alpha, Sigma])*(T - t)/2]))/((Alpha + Eta[Alpha, Sigma])*(Exp[Eta[Alpha, Sigma]*(T - t)] - 1) + 2*Eta[Alpha, Sigma]))ˆ(2*Alpha*Gamma/(Sigma^2)); B[Alpha_, Gamma_, Sigma_, t_, T_] := ((2*(Exp[Eta[Alpha, Sigma]*(T - t)] - 1))/((Alpha + Eta[Alpha, Sigma])*(Exp[Eta[Alpha, Sigma]*(T - t)] -1)+2*Eta[Alpha,Sigma]))ˆ(2*Alpha*Gamma/(Sigma)^2); P[r_, t_, T_, Alpha_, Gamma_, Sigma_] := A[Alpha, Gamma, Sigma, t, T]* Exp[-B[Alpha, Gamma, Sigma, t, T]*r]; DR[r_, T_, Alpha_, Gamma_, Sigma_] := If[T == 0, r, N[-Log[P[r, 0, T, Alpha, Gamma, Sigma]]/T]]; Plot[DR[0.12, T, 1, 0.08, 0.05], {T, 0, 10},AxesLabel -> {"maturity", ""}] For each function with different parameters I obtain a result but when I try to plot...nothing I don't be able to find my mistake so if someone can help me. I hope all is clear. Thanks for your answers. URL: ,

 Subject (listing for 'Problem with Plot') Author Date Posted Problem with Plot Thibault 05/23/13 04:20am Re: Problem with Plot jf 05/23/13 11:00am Re: Problem with Plot Bill Simpson 05/23/13 12:02pm
 Next Comment > Help | Reply To Topic