电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

VB写的最小二乘法曲线拟合VIP免费

VB写的最小二乘法曲线拟合_第1页
1/8
VB写的最小二乘法曲线拟合_第2页
2/8
VB写的最小二乘法曲线拟合_第3页
3/8
Option Explicit Dim x() As Double, y() As Double Dim A(20, 20) As Double, M As Double, B() As Double '最多取20 次的拟合 Dim N As Double, I As Double, j As Double Dim xiaoA() As Double Dim Xmin As Double, Xmax As Double Dim Ymin As Double, Ymax As Double Dim X0pos As Double, Y0pos As Double Dim xmaxpos As Double, ymaxpos As Double Dim xstep As Double, ystep As Double Dim xl As Double, yl As Double Dim xbc As Double, ybc As Double Dim bc As Double Dim Xh As Double Private Sub HuaZuoBiao(x() As Double, y() As Double) ReDim xpos(I) As Double ReDim ypos(I) As Double ReDim x(I), y(I) X0pos = Width * 0.25 '坐标原点最左点 Y0pos = Height * 0.75 '坐标原点最低点 xmaxpos = Width * 0.85 '坐标最右点 ymaxpos = Height * 0.15 '坐标最高点 xstep = (xmaxpos - X0pos) / (Xmax - Xmin) '对应X 轴上单位长度代表的屏幕宽度值 ystep = (ymaxpos - Y0pos) / (Ymax - Ymin) '对应Y 轴上单位长度代表的屏幕高度值 '在屏幕上画直角坐标系 ForeColor = vbBlue Line (Width * 0.1, Y0pos)-(Width * 0.9, Y0pos) '画 X 坐标轴,从左10%,到右的90%处 Line (X0pos, Height * 0.1)-(X0pos, Height * 0.9) '画 y 坐标轴,从上 10%,到下的90%处 Font.Size = 20 '指定 X 轴,Y 轴标志的字体大小 CurrentX = Width * 0.9 CurrentY = Y0pos + 100 Print "X" '在横线上画 X 轴标志 '在横线上画 X 轴箭头标志 CurrentX = Width * 0.9 CurrentY = Y0pos Line (CurrentX - 200, CurrentY - 50)-(CurrentX, CurrentY) Line (Cu rrentX, Cu rrentY)-(Cu rrentX - 200, Cu rrentY + 50) Cu rrentX = X0pos - 500 Cu rrentY = Height * 0.1 Print "y " '在纵线上画 Y 轴标志 '在纵线上画 Y 轴箭头标志 Cu rrentX = X0pos Cu rrentY = Height * 0.1 Line (Cu rrentX - 50, Cu rrentY + 200)-(Cu rrentX, Cu rrentY) Line (Cu rrentX, Cu rrentY)-(Cu rrentX + 50, Cu rrentY + 200) Cu rrentX = X0pos + 200 ...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

VB写的最小二乘法曲线拟合

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部