(2013-07-08 08:47)
看看这个自定义控件吧,其实人家VB没有想象得那么不堪!
代码:
Option Explicit
Private Declare Function DrawText Lib 'user32' Alias
'DrawTextA' (ByVal hDC As Long, ByVal lpStr As String, ByVal nCount
As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Const DT_BOTTOM As Long = &H8
Const DT_CALCRECT As Long = &H400
Const DT_LEFT = &H0
Const DT_TOP = &H0
Const DT_VCENTER = &H4
Const DT_CENTER As Long = &H1
Const DT_WORDBREAK As Long = &H10
(2012-11-19 19:42)
秩亏自由网平差是近代平差理论中非常重要的平差理论,具体可分为普通秩亏自由网平差,拟稳平差,加权秩亏自由网平差,在变形监测和工程控制网中秩亏自由网平差起到了非常重要的作用,由于要处理大量的数据,以及Matlab软件的底层开发局限性,本人开发了一个秩亏自由网平差的小程序,以供大家共享。
程序界面:
(2012-11-04 19:34)
namespace 高斯列主元消去法解方程
{
class Program
{
static double[] Gause(double[,] a,
int n)
{
int i, j, k;
int rank,
columm;
double
temp,l,s;
double[] x = new
double[n];
for (i = 0; i <=
n - 2; i++)
{
rank=i;
columm=i;
for(j=i+1;j<=n-1;j++)
//选主元
(2012-03-22 10:13)
代码:
#include <iostream.h>
struct POINT
{
double x;
double y;
};
struct RECTANGLE
{
POINT ptlefttop;
POINT ptrightbottom;
};
double Area(RECTANGLE rec)
{
double recarea;
recarea=(rec.ptlefttop.y-rec.ptrightbottom.y)*(rec.ptrightbottom.x-rec.ptlefttop.x);
return recarea;
}
void main()
{
RECTANGLE rec;
cout<<'请输入长方形左上角顶点坐标:'<<endl;
cout<<'x=';
cin>>rec.ptlefttop.x;
cout<<'y=';
cin>>rec.ptlefttop.y;
cout<<'请输入长方形右下角顶点坐标:'<<endl;
cout<<'x=';
cin>>rec.ptrightbottom.x;
cout<<'y=';
cin>>rec.ptrightbottom.y;
cout<<'长方形面积:'<<Area(re
(2011-03-05 11:35)
本程序由徐州师范大学测绘学院俞礼彬编写,希望大家指导,提出进一步的要求
程序功能:
1、计算三四等水准测量外业记录数据
2、直观表示综合计算结果
3、对超限成果做显著标志及对外业观测数据进行综述
4、具有文件读写功能
5、具有线路闭合差超限检查的功能
6、与WORD连接直接进行打印操作
操作步骤:
一、登录界面
1、登录时必须输入用户名和密码

2、进入主程序

clear
clc
format long
tp=input('tp=');
toc=input('toc=');
a0=input('a0=');
a1=input('a1=');
a2=input('a2=');
toe=input('toe=');
M0=input('M0=');
a=input('长半径a=');
deltan=input('卫星平均角速度之差deltan=');
e=input('e=');
w=input('w=');
Cuc=input('Cuc=');
Cus=input('Cus=');
Cic=input('Cic=');
Cis=input('Cis=');
Crc=input('Crc=');
Crs=input('Crs=');
i0=input('i0=');
I=input('轨道倾角变化率I=');
OM0=input('OM0=');
OM=input('升交点赤径变化率OM=');
tt=a0+a1*(tp-toc)+a2*(tp-toc);
t=tp-tt;
tk=t-toe;
u=3986005*10^8;
n0=sqrt(u/a^3);
n=n0+deltan;
Mk=M0+n*tk;
Dk=1;
Ek=0;
n1=0;
while abs(Ek-Dk)>0.0000000001
n1=n1+1;
Ek=Dk;
Dk=Mk+e*sin(Ek);
end
Ek=Dk;
Vk=atan(sqrt(1-e*e)*sin(Ek)/(cos(Ek)-e));
if
clear
clc
name=['王' '张' '刘' '李' '陈' '杨' '于' '黄' '郭' '赵'];
score=[72 83 56 94 100 88 96 68 54 65];
n=length(score);
for i=1:n
a{i}=89+i;
b{i}=79+i;
c{i}=69+i;
d{i}=59+i;
end
c=[d,c];
for i=1:n
switch score(i)
case 100
rank(i,:)=' 满分';
case a
rank(i,:)=' 优秀';
case b
rank(i,:)=' 良好';
case c
rank(i,:)=' 及格';
&nb