.. _fplot: Fplots ------ MATLAB includes another 2-D plotting function that comes in handy when working with either function handles, anonymous functions, or symbolic math functions (:ref:`function-handles`, :ref:`symbODE`). The plot, annotations, and options are the same as the ``plot`` function. However, instead of passing vectors for the :math:`x` and :math:`y` data, we give ``fplot`` a function and a range of values for the :math:`x` axis. The default :math:`x` axis range is :math:`-`\ 5 to 5. In addition to being convenient when working with function handles or symbolic math functions, ``fplot`` also correctly handles plotting difficulties, such as data discontinuities. A good example of this comes from the trigonometric tangent function, shown in figure :numref:`fig-tanFplot`, :: >> fplot(@(x) tan(x), [0 2*pi]) .. _fig-tanFplot: .. figure:: tanFplot.png :figclass: center-caption :align: center :width: 60% :alt: The fplot function handles the data discontinuities of the tangent function. The ``fplot`` function handles the data discontinuities of the tangent function. .. note:: Now work on :ref:`HomeRunHW`.