设计有理数类rational_number 数据成员: int numerator(分子) int denominator(分母) 成员函数 (1)构造函数rational_number ()和rational_number (int x, int y) (2)拷贝构造函数 (3) 重载运算符“+”、“-”、“*”和“/” 2. 设计有理数类rational_number 数据成员: int numerator(分子) int denominator(分母) 成员函数 (1)构造函数rational_number ()和rational_number (int x, int y) (2)拷贝构造函数 友元重载运算符“+”、“-”、“*”和“/” 3. 分别使用以上两个类,完成有理数的加、减、乘、除运算;验证其加运算、乘运算的交换律。
标签: 61656 rational_number denominator int
上传时间: 2014-11-04
上传用户:caiiicc
//=== === === === === === === === === === === ===== //函数说明 //函数名称:Correlation //函数功能:计算最小二乘法拟合的多项式的相关系数 //使用方法:int M------ 拟合多项式的阶数(已知条件) // double *b--- 拟合曲线的系数,排列顺序为由高阶到低阶(已知条件) // double *x--- 结点x轴数据(已知条件) // double *y--- 结点y轴数据(已知条件) // double *Yg-- 结点估计值,个数为m(过程变量) // int m------ 结点个数(已知条件) //注意事项:多项式阶数最高为10,多项式的形式为 y = a0 + a1x +a2x2
标签: Correlation 函数 计算 最小二乘法拟合
上传时间: 2013-11-26
上传用户:change0329
//=== === === === === === === === === === === ===== //函数说明 //函数名称:Correlation //函数功能:计算最小二乘法拟合的多项式的相关系数 //使用方法:int M------拟合多项式的项数(已知条件) // double *b---拟合曲线的系数,按升次排列(已知条件) // double *x---结点x轴数据(已知条件) // double *y---结点y轴数据(已知条件) // double *Yg--结点估计值,与*y相对应,个数为m(过程变量) // int m------结点个数(已知条件) //注意事项:多项式阶数最高为10,多项式的形式为 y = b0 + b1*(x-Xavr)...
标签: Correlation 函数 计算 最小二乘法拟合
上传时间: 2014-11-23
上传用户:yxgi5
//=== === === === === === === === === === === === === === = //函数说明 //函数名称:PolyFit //函数功能:最小二乘法曲线拟合 //使用方法:double *x ---- 存放n个数据点的X坐标 // double *y ---- 存放n个数据点的Y坐标 // int n -------- 给定数据点个数 // double *a ---- 返回m-1次拟合多项式的m个系数 // int m -------- 拟合多项式的项数,即拟合多项式的最高次为m-1。要求m<=n,且 // m<=20。若m>n或m>20,则本函数自动按m=min{n,20}处理 // double *dt --- dt[0]返回拟合多项式与各数据点误差的平方和;dt[1]返回拟合多 // 项式与各数据点的误差绝对值之和;dt[2]返回拟合多项式与各数据 // 点误差绝对值的最大值 //注意事项:拟合多项式的形式为 y = b0 + b1*(x-Xavr)...
上传时间: 2015-07-19
上传用户:waizhang
空间后方交汇求解相机外方位元素,变量如下 % x,y 控制点像点坐标 % X,Y,Z 控制点空间坐标 %f焦距 %X0,Y0,Z0,a,b,c六个外方位元素 %x0,y0,-f内方位元素:光心坐标 %cha,chb,chc:外方位角元素改正数 %count 记录迭代次数 %R 旋转矩阵 %A 线性化的偏导系数矩阵 %L 常数项矩阵 %M0 外方位元素矩阵 %M1 外方位元素改正数矩阵
上传时间: 2014-01-10
上传用户:saharawalker
zemax源码: This DLL models an anamorphic aspheric surface. This surface is essentially an even aspheric surface with different terms for the x and y directions. The sag is given by: Z = ((CX*x*x)+(CY*y*y)) / (1 + sqrt(1-((1+KX)*CX*CX*x*x)-((1+KY)*CY*CY*y*y))) + AR*( (1 - AP)*x*x + (1 + AP)*y*y )^2 + BR*( (1 - BP)*x*x + (1 + BP)*y*y )^3 + CR*( (1 - CP)*x*x + (1 + CP)*y*y )^4 + DR*( (1 - DP)*x*x + (1 + DP)*y*y )^5 Note the terms AR, BR, CR, and DR ... have units of length to the -3, -5, -7, and -9 power. The terms AP, BP, CP, and DP are dimensionless. The surface is rotationally symmetric only if AP = BP = CP = DP == 0 and CX = CY and KX = KY.
标签: surface This essentially anamorphic
上传时间: 2015-07-25
上传用户:lht618
zemax源码: This DLL models a standard ZEMAX surface type, either plane, sphere, or conic The surface also demonstrates a user-defined apodization filter The filter is defined as part of the real ray trace, case 5 The filter can be used at the stop to produce x-y Gaussian apodization similar to the Gaussian pupil apodization in ZEMAX but separate in x and y. The amplitude apodization is of the form EXP[-(Gx(x/R)^2 + Gy(y/R)^2)] The transmission is of the form EXP[-2(Gx(x/R)^2 + Gy(y/R)^2)] where x^2 + y^2 = r^2 R = semi-diameter The tranmitted intensity is maximum in the center. T is set to 0 if semi-diameter < 1e-10 to avoid division by zero.
标签: standard surface models either
上传时间: 2013-12-05
上传用户:003030
* 本算法用最小二乘法依据指定的M个基函数及N个已知数据进行曲线拟和 * 输入: m--已知数据点的个数M * f--M维基函数向量 * n--已知数据点的个数N-1 * x--已知数据点第一坐标的N维列向量 * y--已知数据点第二坐标的N维列向量 * a--无用 * 输出: 函数返回值为曲线拟和的均方误差 * a为用基函数进行曲线拟和的系数, * 即a[0]f[0]+a[1]f[1]+...+a[M]f[M].
上传时间: 2015-07-26
上传用户:
* 用改进的欧拉方法求解初值问题,其中一阶微分方程未y =f(x,y) * 初始条件为x=x[0]时,y=y[0]. * 输入: f--函数f(x,y)的指针 * x--自变量离散值数组(其中x[0]为初始条件) * y--对应于自变量离散值的函数值数组(其中y[0]为初始条件) * h--计算步长 * n--步数 * 输出: x为说求解的自变量离散值数组 * y为所求解对应于自变量离散值的函数值数组
标签: 初值
上传时间: 2015-07-26
上传用户:libinxny
Echo RTU/PLC系列产品,采用"GSM 无线Modem模块"通讯例程
上传时间: 2015-08-06
上传用户:yangbo69