MathGroup Archive 2005

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

Search the Archive

Re: Defining functions using the output of an other function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59628] Re: Defining functions using the output of an other function
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Sun, 14 Aug 2005 04:38:12 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 8/13/05 at 3:26 AM, e.schlemm at t-online.de (Eckhard Schlemm)
wrote:

>Is there any possibility in mathematica to define a function using
>te output of another function such as   D[] oder Solve[] ?

>for ex.

>r[t_]::=Solve[y=x^2,y,x];

>That actually does not work, just in order to illustrate what i am
>talking about^^

It doesn't work as it make no sense and isn't valid Mathematica syntax. The first argument to Solve is expected to be an equation. In Mathematica that is expressed using "==" not "=". But correcting this syntax error doesn't lead to a sensible problem. That is

Solve[y==x^2, y, x] 

asks Mathematica to solve the equation y == x^2 for y eliminating x. Clearly given the equation, this is nonsense.

It also makes no sense to define a function having as an argument a variable name t on the left hand side with nothing on the right hand side making any use of that variable. 

Finally, a function definition would be created typically using SetDelayed (":=") or possibly Set ("=") not "::=".

But in answer to your question, yes the output of one function in Mathematica can be use as an input to another. This is done all the time by users.

If you wan more specific help, you need to post something much closer to being sensible with preferably valid Mathematica syntax.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Defining functions using the output of an other function
  • Next by Date: Re: Can Divisors Be Compile?
  • Previous by thread: Re: Re: Defining functions using the output of an other function
  • Next by thread: Plotting a vector function