To ezplot tanh(x)
from -2pi
to 2pi
in Matlab, you can follow these steps:
tanh(x)
using the symbolic toolbox in Matlab.ezplot
function to plot the graph of tanh(x)
.-2pi
to 2pi
.Here's the code to do that:
main.m127 chars7 lines
This will plot the graph of tanh(x)
from -2pi
to 2pi
and add a title as well as the x and y-axis labels for better visualization.
gistlibby LogSnag