Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

`Function1`

, `Function2`

, `Baseline`

First function/curve delimiting hatch

**MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.**

**MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.**

`Baseline` , `Function1` , `Function2` | Mandatory | Text string |

Objects | Default Values |
---|---|

`plot::Hatch` , `plot::Integral` |

`Function1`

and `Function2`

refer
to the functions that define the borders of a hatched 2D region of
type `plot::Hatch`

.

`Baseline`

is the *y* value
of a straight horizontal border line of a hatch.

`Function1`

, `Function2`

are
very technical attributes that a user will hardly ever use.

If `f`

, _{1}`f`

are
function objects of type _{2}`plot::Function2d`

,
the hatch object `h := plot::Hatch(f`

stores references to the objects _{1},
f_{2})`f`

, _{1}`f`

as
the slots _{2}`h::Function1`

, `h::Function2`

.
These are text references (i.e., strings) by which the function objects `f`

, _{1}`f`

can
be identified, but not the function objects themselves._{2}

`Function1`

points to a function object of
type `plot::Function2d`

or
a curve object of type `plot::Curve2d`

.

`Function1`

is usually set implicitly by `plot::Hatch`

to the `Name`

attribute
of its first argument.

When `Function1`

refers to a curve of type `plot::Curve2d`

, `Function2`

and `Baseline`

are
ignored.

`Function2`

is the (optional) second border
function of a hatch. In the plot, the hatched area is bounded by the
two functions referred to by `Function1`

and `Function2`

.

If `Function2`

is given, `Function1`

must
refer to a function graph of type `plot::Function2d`

, too.

`Function2`

is usually set implicitly by `plot::Hatch`

to the `Name`

attribute
of its second argument.

`Baseline`

is an alternative second delimiter
of a hatch. It defines a horizontal border line of the hatch with
a *y*-value
given by `Baseline`

. The `Baseline`

expression
may be animated.

We hatch the area between the functions and *x*^{2}:

f1 := plot::Function2d(sqrt(x), x = 0..2, Color = RGB::Black): f2 := plot::Function2d(x^2, x = 0..2, Color = RGB::Blue): h := plot::Hatch(f1, f2): plot(f1, f2, h)

The references to the border functions are stored a strings
in the hatch object `h`

:

h::Function1, h::Function2

`Baseline`

serves as an alternative for the
special case of a constant border function. The `Baseline`

value
can be animated:

h := plot::Hatch(f1, sqrt(2)*a, a = 0 .. 1): h::Baseline

plot(f1, h)

A (closed) curve of type `plot::Curve2d`

may be used as the boundary
of the hatch:

f1 := plot::Curve2d([sin(2*x), cos(3*x)], x = 0..2*PI, Color = RGB::Black): h := plot::Hatch(f1): h::Function1

plot(f1, h)

delete f1, f2, h, c:

Was this topic helpful?