|
[Date Index]
[Thread Index]
[Author Index]
Re: How to convert the expression 3*x to a function in
- To: mathgroup at smc.vnet.net
- Subject: [mg128459] Re: How to convert the expression 3*x to a function in
- From: pw <p.willis at telus.net>
- Date: Mon, 22 Oct 2012 02:01:52 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <20121021061016.A03EE684B@smc.vnet.net>
On 10/20/2012 11:10 PM, pedro_fr_22 at hotmail.com wrote:
> In doing a program in Mathematica that receives an expression called f and converts it to a function. However the command Function[x,f] doesn't work, what do I do?
>
>
(*---The Function Declaration---*)
MyFunction[x_, c_] := x*c
(*---Calling The Function---*)
x = 12
B = MyFunction[x , 3]
Or if you always want to multiply by 3,
MyFunction[x_] := x*3
x = 12
B = MyFunction[x]
Peter
Prev by Date:
Re: How to convert the expression 3*x to a function in Mathematica?
Next by Date:
Re: How to convert the expression 3*x to a function in Mathematica?
Previous by thread:
Re: How to convert the expression 3*x to a function in Mathematica?
Next by thread:
Re: How to convert the expression 3*x to a function in Mathematica?
|