此為手柄的測試程式,在網(wǎng)路上找到的!應該對大家不錯!
上傳時間: 2013-12-16
上傳用戶:ynzfm
設計有理數(shù)類rational_number 數(shù)據(jù)成員: int numerator(分子) int denominator(分母) 成員函數(shù) (1)構造函數(shù)rational_number ()和rational_number (int x, int y) (2)拷貝構造函數(shù) (3) 重載運算符“+”、“-”、“*”和“/” 2. 設計有理數(shù)類rational_number 數(shù)據(jù)成員: int numerator(分子) int denominator(分母) 成員函數(shù) (1)構造函數(shù)rational_number ()和rational_number (int x, int y) (2)拷貝構造函數(shù) 友元重載運算符“+”、“-”、“*”和“/” 3. 分別使用以上兩個類,完成有理數(shù)的加、減、乘、除運算;驗證其加運算、乘運算的交換律。
標簽: 61656 rational_number denominator int
上傳時間: 2014-11-04
上傳用戶:caiiicc
//=== === === === === === === === === === === ===== //函數(shù)說明 //函數(shù)名稱:Correlation //函數(shù)功能:計算最小二乘法擬合的多項式的相關系數(shù) //使用方法:int M------ 擬合多項式的階數(shù)(已知條件) // double *b--- 擬合曲線的系數(shù),排列順序為由高階到低階(已知條件) // double *x--- 結點x軸數(shù)據(jù)(已知條件) // double *y--- 結點y軸數(shù)據(jù)(已知條件) // double *Yg-- 結點估計值,個數(shù)為m(過程變量) // int m------ 結點個數(shù)(已知條件) //注意事項:多項式階數(shù)最高為10,多項式的形式為 y = a0 + a1x +a2x2
標簽: Correlation 函數(shù) 計算 最小二乘法擬合
上傳時間: 2013-11-26
上傳用戶:change0329
//=== === === === === === === === === === === ===== //函數(shù)說明 //函數(shù)名稱:Correlation //函數(shù)功能:計算最小二乘法擬合的多項式的相關系數(shù) //使用方法:int M------擬合多項式的項數(shù)(已知條件) // double *b---擬合曲線的系數(shù),按升次排列(已知條件) // double *x---結點x軸數(shù)據(jù)(已知條件) // double *y---結點y軸數(shù)據(jù)(已知條件) // double *Yg--結點估計值,與*y相對應,個數(shù)為m(過程變量) // int m------結點個數(shù)(已知條件) //注意事項:多項式階數(shù)最高為10,多項式的形式為 y = b0 + b1*(x-Xavr)...
標簽: Correlation 函數(shù) 計算 最小二乘法擬合
上傳時間: 2014-11-23
上傳用戶:yxgi5
//=== === === === === === === === === === === === === === = //函數(shù)說明 //函數(shù)名稱:PolyFit //函數(shù)功能:最小二乘法曲線擬合 //使用方法:double *x ---- 存放n個數(shù)據(jù)點的X坐標 // double *y ---- 存放n個數(shù)據(jù)點的Y坐標 // int n -------- 給定數(shù)據(jù)點個數(shù) // double *a ---- 返回m-1次擬合多項式的m個系數(shù) // int m -------- 擬合多項式的項數(shù),即擬合多項式的最高次為m-1。要求m<=n,且 // m<=20。若m>n或m>20,則本函數(shù)自動按m=min{n,20}處理 // double *dt --- dt[0]返回擬合多項式與各數(shù)據(jù)點誤差的平方和;dt[1]返回擬合多 // 項式與各數(shù)據(jù)點的誤差絕對值之和;dt[2]返回擬合多項式與各數(shù)據(jù) // 點誤差絕對值的最大值 //注意事項:擬合多項式的形式為 y = b0 + b1*(x-Xavr)...
上傳時間: 2015-07-19
上傳用戶:waizhang
空間后方交匯求解相機外方位元素,變量如下 % x,y 控制點像點坐標 % X,Y,Z 控制點空間坐標 %f焦距 %X0,Y0,Z0,a,b,c六個外方位元素 %x0,y0,-f內(nèi)方位元素:光心坐標 %cha,chb,chc:外方位角元素改正數(shù) %count 記錄迭代次數(shù) %R 旋轉矩陣 %A 線性化的偏導系數(shù)矩陣 %L 常數(shù)項矩陣 %M0 外方位元素矩陣 %M1 外方位元素改正數(shù)矩陣
上傳時間: 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
* 本算法用最小二乘法依據(jù)指定的M個基函數(shù)及N個已知數(shù)據(jù)進行曲線擬和 * 輸入: m--已知數(shù)據(jù)點的個數(shù)M * f--M維基函數(shù)向量 * n--已知數(shù)據(jù)點的個數(shù)N-1 * x--已知數(shù)據(jù)點第一坐標的N維列向量 * y--已知數(shù)據(jù)點第二坐標的N維列向量 * a--無用 * 輸出: 函數(shù)返回值為曲線擬和的均方誤差 * a為用基函數(shù)進行曲線擬和的系數(shù), * 即a[0]f[0]+a[1]f[1]+...+a[M]f[M].
標簽: 數(shù)據(jù) 函數(shù) 算法 最小二乘法
上傳時間: 2015-07-26
上傳用戶:
* 用改進的歐拉方法求解初值問題,其中一階微分方程未y =f(x,y) * 初始條件為x=x[0]時,y=y(tǒng)[0]. * 輸入: f--函數(shù)f(x,y)的指針 * x--自變量離散值數(shù)組(其中x[0]為初始條件) * y--對應于自變量離散值的函數(shù)值數(shù)組(其中y[0]為初始條件) * h--計算步長 * n--步數(shù) * 輸出: x為說求解的自變量離散值數(shù)組 * y為所求解對應于自變量離散值的函數(shù)值數(shù)組
標簽: 初值
上傳時間: 2015-07-26
上傳用戶:libinxny