Re: Specify a variable
- To: mathgroup at smc.vnet.net
- Subject: [mg33913] Re: Specify a variable
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 23 Apr 2002 07:13:23 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <a9muer$a8v$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, Mathematica has not data types, it use patterns. A floating point argument is the restricted pattern: YourFunction[x_Real]:=Some code and a pattern for a matrix is restricted by: YourMatrixFunction[m_?MatrixQ]:=some othe code Regards Jens Guojun Zhu wrote: > > Can I indicate a variable's type, a function, a real number, a matrix or > a complex number? > > Can I specify it in functions such as D[], Integrate?