Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Get only numerical value from a structured output' topicStudent Support Forum > General > "Get only numerical value from a structured output"

Next Comment >Help | Reply To Topic
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: ,

Subject (listing for 'Get only numerical value from a structured output')
Author Date Posted
Get only numerical value from a structured output Xiangyu Meng 10/09/12 10:51am
Re: Get only numerical value from a structured ... Bill Simpson 10/09/12 12:28pm
Next Comment >Help | Reply To Topic