set defaults for parameters - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Education : Student Package : Linear Algebra : Student/SetDefault

Student[SetDefault] - set defaults for parameters

 Calling Sequence SetDefault(opts)

Parameters

 opts - 1 or more equations of the form option = value

Description

 • The SetDefault(opts) command sets the default value of the corresponding options for use in Student package routines.  More than one such option setting can be given in the command invocation.
 The options which can be set this way are:

 Option name Type Purpose hardwarefloats truefalse or deduced whether to use hardware in float computations conjugate truefalse whether to treat variables as real (false) or complex (true) infodigits posint number of digits to display in messages associated with plots

 • The return value from a call to SetDefault is the previous value of each option given in the invocation.  This allows you to save and restore the prior state when temporarily modifying the default setting of one or more options.
 • The conjugate option can also be locally adjusted by providing a conjugate parameter in the calling sequence to any package function which accepts it.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\right):$
 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $A:=⟨a,b⟩$
 ${A}{:=}\left[\begin{array}{c}{a}\\ {b}\end{array}\right]$ (1)
 > $\mathrm{Norm}\left(A,2\right)$
 $\sqrt{{{a}}^{{2}}{+}{{b}}^{{2}}}$ (2)
 > $\mathrm{Norm}\left(A,2,\mathrm{conjugate}=\mathrm{true}\right)$
 $\sqrt{{\left|{a}\right|}^{{2}}{+}{\left|{b}\right|}^{{2}}}$ (3)
 > $\mathrm{SetDefault}\left(\mathrm{conjugate}=\mathrm{true}\right)$
 ${\mathrm{conjugate}}{=}{\mathrm{false}}$ (4)
 > $\mathrm{Norm}\left(A,2\right)$
 $\sqrt{{\left|{a}\right|}^{{2}}{+}{\left|{b}\right|}^{{2}}}$ (5)
 > $v:=⟨1.37,3.4⟩:$
 > $w:=⟨5.2,-1.1⟩:$
 > $v\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}w$
 ${3.38400000000000034}$ (6)
 > $A\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}w$
 ${5.2}{}\stackrel{{&conjugate0;}}{{a}}{-}{1.1}{}\stackrel{{&conjugate0;}}{{b}}$ (7)
 > $d:=\mathrm{SetDefault}\left(\mathrm{conjugate}=\mathrm{false},\mathrm{hardwarefloats}=\mathrm{deduced}\right)$
 ${d}{:=}{\mathrm{conjugate}}{=}{\mathrm{true}}{,}{\mathrm{hardwarefloats}}{=}{\mathrm{false}}$ (8)
 > $v\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}w$
 ${3.38400000000000034}$ (9)
 > $A\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}w$
 ${5.2}{}{a}{-}{1.1}{}{b}$ (10)
 > $\mathrm{SetDefault}\left(d,\mathrm{infodigits}=3\right)$
 ${\mathrm{conjugate}}{=}{\mathrm{false}}{,}{\mathrm{hardwarefloats}}{=}{\mathrm{deduced}}{,}{\mathrm{infodigits}}{=}{4}$ (11)
 > $\mathrm{infolevel}[\mathrm{Student}[\mathrm{LinearAlgebra}]]:=1:$
 > $\mathrm{EigenPlot}\left(⟨⟨2,3⟩|⟨2,-1⟩⟩\right)$
 > $\mathrm{restart}$
 > $\mathrm{with}\left(\mathrm{Student}\right):$
 > $\mathrm{with}\left(\mathrm{MultivariateCalculus}\right):$
 > $⟨a,b⟩\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}⟨c,d⟩$
 ${a}{}{c}{+}{b}{}{d}$ (12)
 > $⟨a,b⟩\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}⟨c,d⟩\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\left(\mathrm{conjugate}=\mathrm{true}\right)$
 $\stackrel{{&conjugate0;}}{{a}}{}{c}{+}\stackrel{{&conjugate0;}}{{b}}{}{d}$ (13)
 > $\mathrm{SetDefault}\left(\mathrm{conjugate}=\mathrm{true}\right):$
 > $⟨a,b⟩\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}⟨c,d⟩$
 $\stackrel{{&conjugate0;}}{{a}}{}{c}{+}\stackrel{{&conjugate0;}}{{b}}{}{d}$ (14)
 See Also

Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam