Student - 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 arguments of the form option = value or option

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.
 If given just in the form option the current value of the corresponding option is returned.
 The options which can be set or queries 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 an expression sequence showing the current value of each option given in the argument form option and/or the previous value of each option given in the form option = value.  This allows you to save and restore the prior state when temporarily modifying the default setting of one or more options.
 • If no arguments are given, so the invocation is just as SetDefault(), an expression sequence giving the current values of all options settable through this means is returned.
 • 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{SetDefault}\left(\right)$
 ${\mathrm{conjugate}}{=}{\mathrm{false}}{,}{\mathrm{infodigits}}{=}{4}{,}{\mathrm{hardwarefloats}}{=}{\mathrm{false}}$ (1)
 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $A≔⟨a,b⟩$
 ${A}{:=}\left[\begin{array}{c}{a}\\ {b}\end{array}\right]$ (2)
 > $\mathrm{Norm}\left(A,2\right)$
 $\sqrt{{{a}}^{{2}}{+}{{b}}^{{2}}}$ (3)
 > $\mathrm{Norm}\left(A,2,\mathrm{conjugate}=\mathrm{true}\right)$
 $\sqrt{{\left|{a}\right|}^{{2}}{+}{\left|{b}\right|}^{{2}}}$ (4)
 > $\mathrm{SetDefault}\left(\mathrm{conjugate}\right)$
 ${\mathrm{conjugate}}{=}{\mathrm{false}}$ (5)
 > $\mathrm{SetDefault}\left(\mathrm{conjugate}=\mathrm{true}\right)$
 ${\mathrm{conjugate}}{=}{\mathrm{false}}$ (6)
 > $\mathrm{Norm}\left(A,2\right)$
 $\sqrt{{\left|{a}\right|}^{{2}}{+}{\left|{b}\right|}^{{2}}}$ (7)
 > $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}$ (8)
 > $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}}$ (9)
 > $d≔\mathrm{SetDefault}\left(\mathrm{conjugate}=\mathrm{false},\mathrm{hardwarefloats}=\mathrm{deduced}\right)$
 ${d}{:=}{\mathrm{conjugate}}{=}{\mathrm{true}}{,}{\mathrm{hardwarefloats}}{=}{\mathrm{false}}$ (10)
 > $v\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}w$
 ${3.38400000000000034}$ (11)
 > $A\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}w$
 ${5.2}{}{a}{-}{1.1}{}{b}$ (12)
 > $\mathrm{SetDefault}\left(d,\mathrm{infodigits}=3\right)$
 ${\mathrm{conjugate}}{=}{\mathrm{false}}{,}{\mathrm{hardwarefloats}}{=}{\mathrm{deduced}}{,}{\mathrm{infodigits}}{=}{4}$ (13)
 > ${\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}$ (14)
 > $⟨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}$ (15)
 > $\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}$ (16)

 See Also

## Was this information helpful?

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