| Contents | Index |
plot::Inequality(f(x, y) < g(x, y), x =
, y =
) fills the rectangle
,
with several colors, indicating which points satisfy the inequality.
Calls:
plot::Inequality(ineq, x =
..
, y =
..
, <a = amin .. amax>, Options)
plot::Inequality([ineq1, ...], x =
..
, y =
..
, <a = amin .. amax>, Options)
Parameters:
|
ineq, ineq1, ...: |
inequalities to plot: Expressions of the form f(x, y) < g(x, y), f(x, y) <= g(x, y), f(x, y) = g(x, y), f(x, y) >= g(x, y), or f(x, y) > g(x, y). |
|
x, y: |
identifiers or indexed identifiers. These denote the free variables spanning the plane. |
|
|
the ranges for x and y. |
See Also:
plot, plot::copy, plot::Density, plot::Implicit2d, plot::Raster
Details:
plot::Inequality computes a (more or less coarse) rasterization of the area specified by
and
and colors subareas according to whether all of the given inequalities are fulfilled (these are colored in FillColorTrue), at least one inequality is nowhere fulfilled in the subarea (FillColorFalse) or the granularity is insufficient to decide for either of these cases (FillColorUnknown).
You can control the density of the rasterization with the attribute Mesh. Cf. example 2.
plot::Inequality uses interval numerics for evaluation, so the results are reliable, but certain special functions (such as hypergeom) cannot be used because they are not supported for intervals.
Example 1
With a single inequality, plot::Inequality colors the area where it is fulfilled or violated, with areas at the border line, where the inequality is fulfilled in some parts of the rectangle and violated in other parts:
plot(plot::Inequality(x^2 + y^2 < 1,
x = -1.5..1.5, y = -1.5..1.5))

When giving more than one inequality, only those areas where all inequalities are fulfilled are painted in blue (or whatever you set FillColorTrue to), while all rectangles where any inequality is violated (over the whole rectangle) are colored red:
plot(plot::Inequality([x^2 + y^2 < 1, abs(x) > 1/3],
x = -1.5..1.5, y = -1.5..1.5))

Example 2
To get a more detailed image from plot::Inequality, increase the mesh density:
plot(plot::Inequality([x^2 + y^2 < 1, abs(x) > 1/3],
x = -1.5..1.5, y = -1.5..1.5,
Mesh = [120, 80]))

Example 3
Almost all parameters of plot::Inequality can be animated (the mesh is one exception though):
plot(plot::Inequality([abs(x)^a + abs(y)^a < 1],
x = -1.5+sin(a)..1.5+sin(a),
y = -1.5+cos(a)..1.5+cos(a),
Mesh = [64, 64],
a = 1..2*PI+1))



Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |