| Author |
Comment/Response |
Xiangyu Meng
|
10/09/12 10:51am
Define a function as the solution of a PDE:
fsol[K_, \[Delta]_?NumericQ] :=
NDSolve[{0.5* Derivative[2, 0][u][x, t] +
Derivative[0, 1][u][x, t] == -Exp[-2 K t], u[-\[Delta], t] == 0,
u[\[Delta], t] == 0, u[x, 1] == 0},
u[x, t], {x, -\[Delta], \[Delta]}, {t, 0, 1}]
I can evaluate the function as follows:
fsol[-1, 1] /. {x -> 0, t -> 0}
but the output is {{u[0, 0] -> 1.87386}}
How can I only get 1.87386 without u[0,0]. Since this value will be used for some calculation.
URL: , |
|