Re: Putting argument for function
- To: mathgroup at smc.vnet.net
- Subject: [mg8077] Re: [mg8049] Putting argument for function
- From: Wouter Meeussen <wm.vdmcc at vandemoortele.be>
- Date: Tue, 5 Aug 1997 03:22:42 -0400
- Sender: owner-wri-mathgroup at wolfram.com
hi,
why not make a little rule, a rulette say (;-)#
rulette=var:x|y|z->var[t]
and write
it=(z^2==a x^2 +b y^2)
as
it/.rulette
Out[23]=
2 2 2
z[t] == a x[t] + b y[t]
like it?
PS.
watch out for that direct assignment z = etcetera
^
if you use that, then you will never see "z" anymore, so use "==" instead.
Or use {z,a x + b y}.
wouter.
At 01:47 04.08.97 -0400, you wrote:
>I have a function, eg.,
>
>(1) z=a*x+b*y
>
>a, b are constants.
>x, y and z are variables.
>
>I then want to define all the variables as functions of time.
>
>(2) z[t]=a*x[t]+b*y[t]
>
>Can I do this without rewritting the entire equation?
>
>
>Noriaki Kinoshita
>University of Cambridge
>Email:nk204 at cam.ac.uk
>
>
>
>
>
NV Vandemoortele Coordination Center
Group R&D Center
Prins Albertlaan 79
Postbus 40
B-8870 Izegem (Belgium)
Tel: +/32/51/33 21 11
Fax: +/32/51/33 21 75
vdmcc at vandemoortele.be