MATLAB 绘制 tan(x) 函数图像教程
以下是用 MATLAB 绘制 tan(x) 的代码:
x = -pi/2:0.01:pi/2; % 定义x的范围
y = tan(x); % 计算tan(x)的值
plot(x,y); % 绘制tan(x)的图像
xlabel('x'); % 添加x轴标签
ylabel('tan(x)'); % 添加y轴标签
title('tan(x)图像'); % 添加标题
运行上述代码,将会得到一张 tan(x) 函数的图像。
原文地址: https://www.cveoy.top/t/topic/nRrk 著作权归作者所有。请勿转载和采集!