Method on @sym: fplot (f)
Method on @sym: fplot (f, limits)
Method on @sym: fplot (…, …, N)
Method on @sym: fplot (…, …, tol)
Method on @sym: fplot (…, …, fmt)
Method on @sym: [x, y] = fplot (…)

Plot a symbolic expression.

Examples:

syms x
y = cos(3*x)
  ⇒ y = (sym) cos(3⋅x)

fplot (y)

fplot (y, [0 pi])

You can also grab the data that would be plotted and plot it yourself:

syms x

[xx, yy] = fplot (sin (x), [0 1])
  ⇒ xx =
      0
      ...
      1.0000
  ⇒ yy =
      0
      ...
      0.8415

plot (xx, yy)

See help for the (non-symbolic) fplot, which this routine calls after trying to convert sym inputs to anonymous functions.

See also: fplot, @sym/ezplot, @sym/function_handle.

Package: symbolic