[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4756: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4758: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4759: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4760: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
電腦觀點-初學者討論區 • 檢視主題 - Visual Basic & EXCEL 的問題(三角函數)

Visual Basic & EXCEL 的問題(三角函數)

電腦壞了?硬體故障?當機連連?呼朋引伴來救命

版主: hammer, baga80

Visual Basic & EXCEL 的問題(三角函數)

文章imdotal » 週六 6月 30, 2007 6:03 am

我只要做一個可以計算三角的程式
讓text1.text(角度) 在label1算出來
這樣怪怪的..
label1.caption=math.sin(text1*3.14/180)
另外 我要把某一公式=A 應該要在哪設?
我的目的是要計算text1.text的角度
用 Command 算出來顯示在label1.caption
label1.caption=math.sin(text1*3.14/180)<==這樣的公式有錯嗎?
我算Sin1度~Sin5度的值 跟計算機按出來的不一樣說
第二個是要假設某事件 我應該在哪裡假設?
譬如 我要假設A=3.5或B=text.text*8+9這種之類的

另外EXCEL要計算三角函數該怎麼用?
imdotal
一般會員
一般會員
 
文章: 41
註冊時間: 週六 6月 30, 2007 5:53 am

三角函

文章Dora » 週六 6月 30, 2007 8:14 am

VB程式:使用者輸入任一角度, 計算該角度之sin值

Private Sub Form_Activate()
Dim A As Integer
Dim S As Single
N = InputBox("輸入角度:", "INPUT")
A = N* 3.1416 / 180
Print "sin("; N; ")="; Sin(A)
End Sub

說明:N為輸入的角度/A為計算的結果
因沒裝VB,無法用表單畫面給您看.
以類似的ACCESS來解說:
1.表單上設一個文字方塊(名稱:TEXT1),其值為角度的值.
2.再設一個文字方塊求結果,其值公式為=[TEXT1]*3.1416/180
--------------------------------------------------------
EXCEL的SIN正弦函數,是將角度以弳度來表示,求得的正弦值以弧度來表示,公式如下:
弧度=弳度*PI()/180
假設:
A2儲存格為弳度值(正弦值的角度)
B2儲存格公式為=SIN(A2*PI()/180)
--------------------
說明:
=SIN(PI()) 等於 1.22E-16,值很接近 0。故PI的正弦值等於0
=SIN(PI()/2) 等於 1
=SIN(30*PI()/180) 等於 0.5,30 度角的正弦值
EXCEL:SIN(10*PI()/180)←→計算機:SIN10
...那年的茉莉
乾枯地 躺在你送給我的鉛筆盒裡
變了顏色 換了模樣 像 你我的人生...
http://tw.myblog.yahoo.com/jia-425
頭像
Dora
教學群
教學群
 
文章: 26
註冊時間: 週五 12月 22, 2006 11:16 pm
來自: 網路公海

EXCEL補充

文章Dora » 週六 6月 30, 2007 8:20 am

在EXCEL若角的大小是以角度表示,乘以 PI()/180 轉換外也可以使用 RADIANS 函數將它轉換成弳度。
...那年的茉莉
乾枯地 躺在你送給我的鉛筆盒裡
變了顏色 換了模樣 像 你我的人生...
http://tw.myblog.yahoo.com/jia-425
頭像
Dora
教學群
教學群
 
文章: 26
註冊時間: 週五 12月 22, 2006 11:16 pm
來自: 網路公海

文章imdotal » 週六 6月 30, 2007 5:03 pm

Excel沒問題了
不過VB還是有點問題 1~5度怪怪的
n=5*3.1416/180 =0.087266666
math.sin(n)
變這樣 8.71557427476582E-02
計算機按出來5度0.087155742
VB算出來變那樣 哪出了問題
imdotal
一般會員
一般會員
 
文章: 41
註冊時間: 週六 6月 30, 2007 5:53 am

格式的關係

文章Dora » 週日 7月 01, 2007 11:32 am

...那年的茉莉
乾枯地 躺在你送給我的鉛筆盒裡
變了顏色 換了模樣 像 你我的人生...
http://tw.myblog.yahoo.com/jia-425
頭像
Dora
教學群
教學群
 
文章: 26
註冊時間: 週五 12月 22, 2006 11:16 pm
來自: 網路公海


回到 疑難雜症專區

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 4 位訪客

cron