@sym
: ezplot (f) ¶@sym
: ezplot (f1, f2) ¶@sym
: ezplot (f, dom) ¶@sym
: ezplot (f1, f2, dom) ¶@sym
: ezplot (…, N) ¶Simple plotting of symbolic expressions.
Example parametric plot of a Lissajous Curve:
syms t x = cos(3*t), y = sin(2*t) ⇒ x = (sym) cos(3⋅t) ⇒ y = (sym) sin(2⋅t) ezplot(x, y) % doctest: +SKIP
Example plotting the zero level curve of a function of two variables:
syms x y f = x^2 + y^2 - 1; ezplot (f) % doctest: +SKIP
Here the curve is defined implicitly by f(x, y) == 0
,
but we do not enter the == 0
part.
See help for the (non-symbolic) ezplot
, which this
routine calls after trying to convert sym inputs to
anonymous functions.
Using sym arguments for dom and n can lead to ambiguity where OctSymPy cannot tell if you are specifying n or f2. For example:
syms t f = sin(t); N = sym(50); % parametric plot of f(t), N(t) ezplot(f, N) % doctest: +SKIP % plot f vs t using 50 pts ezplot(f, double(N)) % doctest: +SKIP
The solution, as shown in the example, is to convert the sym to a double.
See also: ezplot, @sym/ezplot3, @sym/ezsurf, @sym/fplot, @sym/function_handle.
Package: symbolic