MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: a small problem from a newbee...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58205] [mg58205] Re: a small problem from a newbee...
  • From: dh <dh at metrohm.ch>
  • Date: Wed, 22 Jun 2005 03:29:32 -0400 (EDT)
  • References: <d9auoe$q0$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
1) "Function" has the attribute "HoldAll" and does therefore not 
evaluate its arguments.
2) Solve returns a "Function" you do not need to wrap it into a second 
"Function". However, this "Function" is given as a List of replacements, 
you have to dig it out.
E.g.
Vzf= y /. DSolve[..] [[1]]
or
Vzf= DSolve[..] [[1,1,2]]

sincerely, Daniel

dibyadeep at gmail.com wrote:
> hi ...i m writing a function in which i have to assign the solution of
> a ode to a variable..i wrote the function like this...but it doesnot
> work..cud u suggest a alternative...
> 
> Vzf=Function[x,DSolve[{y''[x] - g1*y[x] + g2*Cosh[k*x]/Cosh[k] +
>         g3 == 0, y[-1] == 0, y[1] == 0}, y, x]; Vz = y[x] /. %]
> 
> the program doesnot work bcoz thres no output wheni put a ; after
> solution to the ode...so the assignment doesnot work..
> plss help me out...i just cannot find a solution
> 


  • Prev by Date: Re: a question about plot a list of functions.
  • Next by Date: Re: a question about plot a list of functions.
  • Previous by thread: Re: a small problem from a newbee...
  • Next by thread: Re: a small problem from a newbee...