一元稀疏多項式計算器[加法和乘法] 問題描述: 設計一元系數多項式計數器實現兩個多項式間的加法、減法。 基本要求: (1) 輸入并建立多項式 (2) 輸出多項式,輸出形式為整數序列:n,c1,e1,c2,e2……cn,en,其中n是多項式的項數,ci,ei分別為第i項的系數和指數。序列按指數降序排列。 (3) 多項式a和b相加,建立多項式a+b,輸出相加的多項式。 (4) 多項式a和b相減,建立多項式a-b,輸出相減的多項式。 用帶表頭結點的單鏈表存儲多項式。 測試數據: (1) (2x+5x8-3.1x11)+(7-5x8+11x9) (2) (6x-3-x+4.4x2-1.2x9)-(-6x-3+5.4x2+7.8x15) (3) (x+x2+x3)+0 (4) (x+x3)-(-x-x-3)
上傳時間: 2013-12-03
上傳用戶:561596
數字運算,判斷一個數是否接近素數 A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no
上傳時間: 2015-05-21
上傳用戶:daguda
一、RSA基本原理 對明文分組M和密文分組C,加密與解密過程如下: C = POW (M , e) mod n M = POW(C , d) mod n = POW(POW( M ,e), d) mod n=POW( M,e*d) 其中POW是指數函數,mod是求余數函數。 其中收發雙方均已知n,發送放已知e,只有接受方已知d,因此公鑰加密算法的公鑰為 KU={ e , n},私鑰為KR={d , n}。該算法要能用做公鑰加密,必須滿足下列條件: 1. 可以找到e ,d和n,使得對所有M<n ,POW(M ,e*d)=M mod n . 2. 對所有 M<n,計算POW (M , e)和POW(C , d)是比較容易的。 3. 由e 和n確定d是不可行的
上傳時間: 2014-08-04
上傳用戶:sevenbestfei
c語言版的多項式曲線擬合。 用最小二乘法進行曲線擬合. 用p-1 次多項式進行擬合,p<= 10 x,y 的第0個域x[0],y[0],沒有用,有效數據從x[1],y[1] 開始 nNodeNum,有效數據節點的個數。 b,為輸出的多項式系數,b[i] 為b[i-1]次項。b[0],沒有用。 b,有10個元素ok。
上傳時間: 2014-01-12
上傳用戶:變形金剛
針對M/PH/1(k)排隊系統推導出該排隊系統在任意時刻、到達時刻、退去時刻的隊列長度狀態概率分布、平均隊列長度、以及平均等待時間,并編寫程序進行數值計算,并對M/E2/1(k), M/M/1(k), M/H2/1(k)排隊系統的性能進行數值比較。
上傳時間: 2013-11-30
上傳用戶:秦莞爾w
這是我學習《MATLAB程序設計與應用》劉衛國、陳昭平 一書時第一章和第二章的課后習題 目錄 exponential_e.m exsub.m fheritage.m initialise.m matrix.m matrix2.m matrixm.m matrix_c.m matrix_mul.m mult.m mywork1201.dll mywork1201.m normcdf_.m p41_4.m p41_5.asv p41_5.m p41_6.m p41_7.m p41_8.m p64_1.m p64_2.m p64_3.m p64_4.m p64_5.m p65_10_1.m p65_10_2.m p65_10_3.m p65_6.m p65_8.m
標簽: exponential_e fheritage initiali MATLAB
上傳時間: 2015-08-11
上傳用戶:x4587
高精度乘法基本思想和加法一樣。其基本流程如下: ①讀入被乘數s1,乘數s2 ②把s1、s2分成4位一段,轉成數值存在數組a,b中;記下a,b的長度k1,k2; ③i賦為b中的最低位; ④從b中取出第i位與a相乘,累加到另一數組c中;(注意:累加時錯開的位數應是多少位 ?) ⑤i:=i-1;檢測i值:小于k2則轉⑥,否則轉④ ⑥打印結果
上傳時間: 2015-08-16
上傳用戶:源弋弋
1、工具箱:LS_SVMlab Classification_LS_SVMlab.m - 多類分類 Regression_LS_SVMlab.m - 函數擬合 2、工具箱:OSU_SVM3.00 Classification_OSU_SVM.m - 多類分類 3、工具箱:stprtool\svm Classification_stprtool.m - 多類分類 4、工具箱:SVM_SteveGunn Classification_SVM_SteveGunn.m - 二類分類 Regression_SVM_SteveGunn.m - 函數擬合
標簽: Classification_LS_SVMlab Regression_LS_SVMlab LS_SVMlab OSU_SVM
上傳時間: 2014-01-20
上傳用戶:CHINA526
這是關于RADRA仿真的.有如下代碼placeClutter.m, plotDistLines.m, plotFOV.m, radarSimulation.m, runRadarSim.m, targetsReturn.m, radarSimulation.fig, analyzBuffer.m, buildAntenaGain.m, createTargets.m, displayTargets.m, handleRadarControlls.m, MTIcalcTargetsV.m
標簽: radarSimulation plotDistLines placeClutter runRadarSim
上傳時間: 2015-10-15
上傳用戶:GavinNeko
已知一個序列x(n)=0.5cos(0.55*pi*n)+cos(0.45*pi*n),時域FFT分析其頻譜。 (1)使用不同寬度的矩形窗截斷該序列為M點,取M分別為:20,40,160,觀察不同長度對頻譜影響;(2)使用哈明窗和凱澤窗重做;(3)對三種窗的結果進行分析比較;(4)總結窗類型和長度對頻譜分析的影響。
上傳時間: 2013-12-25
上傳用戶:yuanyuan123