[Date Index]
[Thread Index]
[Author Index]
Re: Function definition
*To*: mathgroup at smc.vnet.net
*Subject*: [mg15819] Re: [mg15737] Function definition
*From*: Rangachari Kidambi <rkidambi at spock.usc.edu>
*Date*: Mon, 8 Feb 1999 03:25:44 -0500 (EST)
*Sender*: owner-wri-mathgroup at wolfram.com
Hi,
Thanks to everyone who replied. Most of these approaches worked.
However, i needed to make contours of the defined function. And for
this, i needed to define it in a certain way to get the contours. For
instance, f[theta_,phi_]:=, f[theta,phi]=, wouldn't work. Right now, i
have defined f as
f=If[(0<=th<=th0)&&(0<=phi<=phi0),f1,f2].
I still get a long list of errors but i also get the correct contours.
Thanks again,
Ranga Kidambi
On Fri, 5 Feb 1999, Rangachari Kidambi wrote:
>
> Hi,
>
> I need to define a function f(theta,phi) as
>
> f(theta,phi) = f1 if 0 <= theta <= theta0, 0 <= phi <= phi0 f(theta,phi)
> = f2 otherwise
>
> where theta, phi are spherical polar coordinates, <= is less than or
> equal to and theta0 and phi0 are constants.
>
> I have tried using Do loops and If statements but haven't been
> successful.
>
> Thanks for any help
> Ranga Kidambi
>
>
>
Prev by Date:
**Re: Finding real part (newbie question)**
Next by Date:
**Re: BracketingBar for output**
Previous by thread:
**Re: Function definition**
Next by thread:
**Re: Function definition**
| |