vb画tan函数图像If Combo1.Text = "tan" ThenFor x = -15 To 15 Step
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/06 15:38:32
vb画tan函数图像
If Combo1.Text = "tan" Then
For x = -15 To 15 Step 0.001
y = tan(w * x+fi*pi/180)
Picture1.PSet (x,y),RGB(0,255,0)
Next x
End If
为什么运行之后没有显示呢?
知道啦,是我的Tan的大小写跟之前的不一致了.那fi*pi/180与fi有什么区别没,还有我编cot函数时总是提示数据溢出是怎么回事,If Combo1.Text = "Cot" Then
For x = -15 To 15 Step 0.001
y = 1 / (Tan(w * x))
Picture1.PSet (x,y),RGB(0,255,0)
Next x
End If
If Combo1.Text = "tan" Then
For x = -15 To 15 Step 0.001
y = tan(w * x+fi*pi/180)
Picture1.PSet (x,y),RGB(0,255,0)
Next x
End If
为什么运行之后没有显示呢?
知道啦,是我的Tan的大小写跟之前的不一致了.那fi*pi/180与fi有什么区别没,还有我编cot函数时总是提示数据溢出是怎么回事,If Combo1.Text = "Cot" Then
For x = -15 To 15 Step 0.001
y = 1 / (Tan(w * x))
Picture1.PSet (x,y),RGB(0,255,0)
Next x
End If
答案补充:Cot函数这样修改即可.主要是你没有定义y的类型.至于fi*pi/180与fi有什么区别,那要根据你的fi单位而定.如果你是以角度输入的,那么应该加上*pi/180,如果本身是以弧度输入的,就直接写fi即可.
====================
Private Sub Command1_Click()
Dim x As Single, y As Single
Picture1.Scale (-15, 15)-(15, -15)
For x = -15 To 15 Step 0.001
w = 1
y = 1 / (Tan(w * x))
Picture1.PSet (x, y), RGB(0, 255, 0)
Next x
End Sub
===================
建一个Command1,Picture1,Combo1.使用的时候,请先在Combo1中选择或者输入tan,然后单击按钮.
代码如下.
=================
Const pi = 3.14159265
Private Sub Command1_Click()
Dim x As Single, y As Single, w As Single, fi As Single
If Combo1.Text = "tan" Then
w = 1
fi = 0
Picture1.Scale (-15, 15)-(15, -15)
For x = -15 To 15 Step 0.001
y = Tan(w * x + fi)
Picture1.PSet (x, y), RGB(0, 255, 0)
Next x
End If
End Su
====================
Private Sub Command1_Click()
Dim x As Single, y As Single
Picture1.Scale (-15, 15)-(15, -15)
For x = -15 To 15 Step 0.001
w = 1
y = 1 / (Tan(w * x))
Picture1.PSet (x, y), RGB(0, 255, 0)
Next x
End Sub
===================
建一个Command1,Picture1,Combo1.使用的时候,请先在Combo1中选择或者输入tan,然后单击按钮.
代码如下.
=================
Const pi = 3.14159265
Private Sub Command1_Click()
Dim x As Single, y As Single, w As Single, fi As Single
If Combo1.Text = "tan" Then
w = 1
fi = 0
Picture1.Scale (-15, 15)-(15, -15)
For x = -15 To 15 Step 0.001
y = Tan(w * x + fi)
Picture1.PSet (x, y), RGB(0, 255, 0)
Next x
End If
End Su
vb画tan函数图像If Combo1.Text = "tan" ThenFor x = -15 To 15 Step
两条语句的区别?If Combo1.Text = "进价" Or Combo1.Text = "数量" Or Combo
函数f(x)=tan(x+1)+tan(x+2)+tan(x+3)+.+tan(x+2013)图像的一个对称中心为?
画出函数y= | tan x |+tan x的图像,并根据图像求出函数的主要特征
请教下面VB 代码的意思 Private Sub Command1_Click() If Combo1.Text ""
vb题目for b=1 to 15 step -5
tan函数的图像
y=tanx和y=tan(-x)和y=tan|x|和 y=tan-|x|和y=-tanx和y=-tan|x|的函数图像?
函数y=tan(x-π6
tan(x+45)-tan(45-x)=?
函数y=tan(2x+B)的图像过(丌/12,0)求B
函数y=tan(2x+B)的图像过(丌/12,0)求B.