1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務時間:8:30-17:00
      你可能遇到了下面的問題
      關閉右側工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      vb點虐 三角函數(shù) vba三角函數(shù)

      在vb中。如何進行三角函數(shù)的程序代碼編寫

      有幾個地方要注意:

      創(chuàng)新互聯(lián)專注于龍巖網(wǎng)站建設服務及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供龍巖營銷型網(wǎng)站建設,龍巖網(wǎng)站制作、龍巖網(wǎng)頁設計、龍巖網(wǎng)站官網(wǎng)定制、微信小程序服務,打造龍巖網(wǎng)絡公司原創(chuàng)品牌,更為您提供龍巖網(wǎng)站排名全網(wǎng)營銷落地服務。

      1、VB中的三角函數(shù)的角度全部是用弧度制表示的,如果是度數(shù)的話,應先乘以180再除以π轉成弧度,再用函數(shù)計算結果。

      2、VB中直接支持的三角函數(shù)有:Sin()、Cos()、Tan(),如果涉及到其它三角函數(shù),可以從下面列出的代碼中自己選擇相應的函數(shù):

      Function

      Sec(X)

      As

      Double

      '正割

      Sec

      =

      1

      /

      Cos(Angle)

      End

      Function

      Function

      Csc(X)

      As

      Double

      '余割

      Csc

      =

      1

      /

      Sin(Angle)

      End

      Function

      Function

      Cot(X)

      As

      Double

      '余切

      Cot

      =

      1

      /

      Tan(Angle)

      End

      Function

      Function

      ArcSin(X)

      As

      Double

      '反正弦

      ArcSin

      =

      Atn(X

      /

      Sqr(-X

      *

      X

      +

      1))

      End

      Function

      Function

      ArcCos(X)

      As

      Double

      '反余弦

      ArcCos

      =

      Atn(-X

      /

      Sqr(-X

      *

      X

      +

      1))

      +

      2

      *

      Atn(1)

      End

      Function

      Function

      ArcSec(X)

      As

      Double

      '反正割

      ArcSec

      =

      Atn(X

      /

      Sqr(X

      *

      X

      -

      1))

      +

      Sgn((X)

      -

      1)

      *

      (2

      *

      Atn(1))

      End

      Function

      Function

      ArcCsc(X)

      As

      Double

      '反余割

      ArcCsc

      =

      Atn(X

      /

      Sqr(X

      *

      X

      -

      1))

      +

      (Sgn(X)

      -

      1)

      *

      (2

      *

      Atn(1))

      End

      Function

      Function

      ArcCot(X)

      As

      Double

      '反余切

      ArcCot

      =

      Atn(X)

      +

      2

      *

      Atn(1)

      End

      Function

      Function

      HSin(X)

      As

      Double

      '雙曲正弦

      HSin

      =

      (Exp(X)

      -

      Exp(-X))

      /

      2

      End

      Function

      Function

      HCos(X)

      As

      Double

      '雙曲余弦

      HCos

      =

      (Exp(X)

      +

      Exp(-X))

      /

      2

      End

      Function

      Function

      HTan(X)

      As

      Double

      '雙曲正切

      HTan

      =

      (Exp(X)

      -

      Exp(-X))

      /

      (Exp(X)

      +

      Exp(-X))

      End

      Function

      Function

      HSec(X)

      As

      Double

      '雙曲正割

      HSec

      =

      2

      /

      (Exp(X)

      +

      Exp(-X))

      End

      Function

      Function

      HCsc(X)

      As

      Double

      '雙曲余割

      HCsc

      =

      2

      /

      (Exp(X)

      -

      Exp(-X))

      End

      Function

      Function

      HCot(X)

      As

      Double

      '雙曲余切

      HCot

      =

      (Exp(X)

      +

      Exp(-X))

      /

      (Exp(X)

      -

      Exp(-X))

      End

      Function

      Function

      HArcsin(X)

      As

      Double

      '反雙曲正弦

      HArcsin

      =

      Log(X

      +

      Sqr(X

      *

      X

      +

      1))

      End

      Function

      Function

      HArccos(X)

      As

      Double

      '反雙曲余弦

      HArccos

      =

      Log(X

      +

      Sqr(X

      *

      X

      -

      1))

      End

      Function

      Function

      HArctan(X)

      As

      Double

      '反雙曲正切

      HArctan

      =

      Log((1

      +

      X)

      /

      (1

      -

      X))

      /

      2

      End

      Function

      Function

      HArcsec(X)

      As

      Double

      '反雙曲正割

      HArcsec

      =

      Log((Sqr(-X

      *

      X

      +

      1)

      +

      1)

      /

      X)

      End

      Function

      Function

      HArccsc(X)

      As

      Double

      '反雙曲余割

      HArccsc

      =

      Log((Sgn(X)

      *

      Sqr(X

      *

      X

      +

      1)

      +

      1)

      /

      X)

      End

      Function

      Function

      HArccot(X)

      As

      Double

      '反雙曲余切

      HArccot

      =

      Log((X

      +

      1)

      /

      (X

      -

      1))

      /

      2

      End

      Function

      大佬們~VisualStudio中vb點虐 如何畫三角函數(shù)圖像?

      VB系統(tǒng)的坐標原點在左上角,X軸的正方向是水平向右,而Y軸的正方向是垂直向下。所以,要繪制三角函數(shù)的曲線,自己可以通過改變點坐標的方法來實現(xiàn),當然,VB.NET提供了相應的方法可以來實現(xiàn)坐標變換,也可以通過VB.Net的Graphics類提供的平移、旋轉等轉換來實現(xiàn)。

      下面是我通過自己變換實現(xiàn)的示例,提供參考;我的環(huán)境是VB.NET 2010

      Imports System.Math

      Public Class Form1

      Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

      ? '1,獲得一個Graphics對象

      ? Dim MyGraphics As Graphics

      ? MyGraphics = PictureBox1.CreateGraphics

      ? '2,定義一個Pen對象,用于繪制圖形(輪廓線)

      ? Dim MyPen As New Pen(Color.Black, 1)

      ? '3,定義一個Brush對象,用于填充圖形(如果需要填充的話)

      ? Dim MyBrush As New SolidBrush(Color.Orange)

      ? MyGraphics.DrawLine(MyPen, 0, 200, 700, 200)

      End Sub

      Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

      ? '1,獲得一個Graphics對象

      ? Dim MyGraphics As Graphics

      ? MyGraphics = PictureBox1.CreateGraphics

      ? '2,定義一個Pen對象,用于繪制圖形(輪廓線)

      ? Dim MyPen As New Pen(Color.Black, 1)

      ? '3,定義一個Brush對象,用于填充圖形(如果需要填充的話)

      ? Dim MyBrush As New SolidBrush(Color.Orange)

      ? '聲明橫向和縱向比例變量

      ? Dim Heng As Integer = 20

      ? Dim Zong As Integer = 50

      ? '先獲得正弦值,保存到點坐標數(shù)組

      ? Dim MyPoints(700) As Point

      ? Dim i As Integer

      ? For i = 0 To 700

      ? ? ? MyPoints(i) = New Point(i * Heng, 200 + Sin(i) * Zong)

      ? Next

      ? '采用繪制光滑線連接點的方式繪制曲線

      ? MyGraphics.DrawCurve(MyPen, MyPoints)

      End Sub

      End Class

      顯示的效果圖:

      在visual studio中編寫VB程序時sin cos為何不識別,如何才能輸入三角函數(shù)?

      vb點虐 提供了許多命名空間,三角函數(shù)在?System.Math 命名里:

      在代碼窗口的最上面添加如下代碼:

      Imports System.Math

      見下圖:


      分享名稱:vb點虐 三角函數(shù) vba三角函數(shù)
      文章來源:http://ef60e0e.cn/article/ddjeghe.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        芦溪县| 金坛市| 鹤壁市| 富阳市| 马尔康县| 察隅县| 宝山区| 修文县| 丰原市| 荣成市| 南乐县| 永年县| 吐鲁番市| 南开区| 固阳县| 文水县| 柳州市| 若羌县| 贞丰县| 内乡县| 石泉县| 武陟县| 湘阴县| 乃东县| 清原| 乐至县| 左权县| 自治县| 祁门县| 蒲江县| 家居| 遵化市| 济阳县| 驻马店市| 县级市| 克东县| 武穴市| 肇庆市| 雅江县| 兴安县| 陆河县|