Simple question, how can I plot this tan x function?

21 vues (au cours des 30 derniers jours)
Stephanie Ruiz
Stephanie Ruiz le 23 Mai 2021
I want to be able to plot the following equation into matlab and be able to graph it, but I'm not sure how to do it.
- x = - tan (y)
How would I go about this?

Réponse acceptée

Star Strider
Star Strider le 23 Mai 2021
Perhaps —
x = @(y) tan(y)
x = function_handle with value:
@(y)tan(y)
figure
fplot(x, [-pi pi])
grid
xticks([-pi -pi/2 0 pi/2 pi])
set(gca, 'XTickLabel',{'$-\pi$', '$-\frac{\pi}{2}$' '$0$' '$\frac{\pi}{2}$' '$\pi$'}, 'TickLabelInterpreter','latex', 'FontSize',12)
.

Plus de réponses (0)

Catégories

En savoir plus sur Graph and Network Algorithms dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by