Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
randpoly - random polynomial generator
Calling Sequence
randpoly(vars, opts)
Parameters
vars
-
indeterminate or list or set of indeterminates
opts
(optional) equations or names specifying properties
Description
A call to randpoly generates a random polynomial in vars. It is useful for generating test problems for debugging, testing and demonstration purposes. Several options can be specified, determining the form of the polynomial. This allows for quite general expressions with certain properties.
The first argument vars specifies the variables in which the polynomial is to be generated. If vars is a single variable, a univariate polynomial in that variable will be generated. If vars is a list or set of variables, then a multivariate polynomial will be generated.
The possible options (and their default values) are:
Option
Use
Default Value
coeffs
generate the coefficients
rand(-99..99)
expons
generate the exponents
rand(6)
terms
number of terms generated
6
degree
total degree for a dense polynomial
5
dense
the polynomial is to be dense
sparse
homogeneous
the polynomial is to be homogeneous
The terms option is intended for specifying the number of terms in sparse polynomials, where the numbers of terms is often significantly smaller than the maximum number of possible terms. The terms option will be overridden by the degree option. A call randpoly(x, terms=7) will return a polynomial with six terms, since the default degree is five. If you want a dense polynomial, simply use the dense option.
Examples
randpoly([x], coeffs = proc() randpoly(y) end proc);
Note: The options coeffs and expons are used to generate the individual terms, which are added to form the polynomial. Thus, the generated polynomial may have coefficients outside the specified range. This is more likely if the requested number of terms is significantly larger than the required degree.
See Also
LinearAlgebra[RandomMatrix], LinearAlgebra[RandomVector], rand, RandomTools
Download Help Document