Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7055

Re: Function for complex polynomial with variable number of arguments

From Simon <simonjtyler@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Function for complex polynomial with variable number of arguments
Date 2011-12-09 11:03 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jbspto$3t8$1@smc.vnet.net> (permalink)
References <jbq33b$ica$1@smc.vnet.net>

Show all headers | View raw


You could just add a Default for the pattern p__, i.e.

poly[z_, p__: 0] := Product[z - {p}[[i]], {i, Max[1, Length[{p}]]}]

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Function for complex polynomial with variable number of arguments Chris Young <cy56@comcast.net> - 2011-12-08 10:21 +0000
  Re: Function for complex polynomial with variable number of arguments Simon <simonjtyler@gmail.com> - 2011-12-09 11:03 +0000

csiph-web