Simple question, how can I plot this tan x function?
21 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Star Strider
2021-5-23
Perhaps —
x = @(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)
.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graph and Network Algorithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
