User Defined Functions: Domain Range
User Defined Functions: Domain Range
f
Domain Range
Lecture 3
x f f(x)
y
(x1,x2) f = x1+x2
(matlab demo)
demo: countEm()
• scalars
• arrays
This function
has two
inputs
• Recall the
max function
• It returns two
results
At first this
function looks
like it returns
two values – but
it really only
returns a single
array with two
elements
• 6.1, p 189
Work a few, e.g. 1, 2, 3, and 4
Call the solution to 3 function sinP.
Look at HW 6 -- expP
• 6.2, p 196
Work a few
In math terms --
The range may be the empty set
If star1 is set
equal to a
variable, the
rhyme is returned