You can use the linspace
function to create an array of 101 equally-spaced values of theta
from -2 to 2, and then calculate the values of the six hyperbolic trigonometric functions (sinh
, cosh
, tanh
, csch
, sech
, and coth
) for each element of theta
. Finally, use the plot
function to plot the values of each function against theta
. Here's the code:
main.m284 chars11 lines
This will plot all six functions on the same graph, with a legend specifying which function corresponds to which line. The xlabel
function adds a label to the x-axis to indicate that the horizontal axis represents theta
.
gistlibby LogSnag