% EM algorithm for k multidimensional Gaussian mixture estimation % % Inputs: % X(n,d) - input data, n=number of observations, d=dimension of variable % k - maximum number of Gaussian components allowed % ltol - percentage of the log likelihood difference between 2 iterations ([] for none) % maxiter - maximum number of iteration allowed ([] for none) % pflag - 1 for plotting GM for 1D or 2D cases only, 0 otherwise ([] for none) % Init - structure of initial W, M, V: Init.W, Init.M, Init.V ([] for none) % % Ouputs: % W(1,k) - estimated weights of GM % M(d,k) - estimated mean vectors of GM % V(d,d,k) - estimated covariance matrices of GM % L - log likelihood of estimates %
標簽: multidimensional estimation algorithm Gaussian
上傳時間: 2013-12-03
上傳用戶:我們的船長
排隊論中的一個仿真程序,主要是用于仿真M/M/1、M/D/1模型。輸入排隊模型相關參量,返回計算結果。
標簽: 仿真程序
上傳時間: 2015-03-04
上傳用戶:change0329
自定義一個簡單的日期類DateType,它具有數據成員y、m、d,用來表示當前日期的年、月、日。而后設計該類欲實現(完成)的功能,進而設計出相應的類成員函數。 例如,下面給出的“雛形”可用來實現對天的增加,比較兩個日期是否相等,以及對日期的輸出等操作。請完成各類成員函數,并編制主函數,說明DateType類對象,對定義的各成員函數進行調用,以驗證它們的正確性。 class DateType { //自定義的日期類DateType int y,m,d //數據成員,表示當前日期的年、月、日 public: DateType(int y0=1, int m0=1, int d0=1) //構造函數,設定年、月、日;并設置參數默認值 void incrementDay() //增加1天 bool equal(DateType dt2) //判斷二日期是否相等 void printDate() //屏幕輸出日期對象的有關數據(年、月、日) }
上傳時間: 2013-12-22
上傳用戶:songyue1991
Java程序最小到系統托盤源代碼 Java程序最小到系統托盤只用java是達不到的,你可以用Java Native Interface結合C或者C++的有關方法來實現!利用C++生成.dll文件來供java調用! %-!!m D? 我也收集了一些源代碼,這里拿出來供參考一下! .K8a-}qL 這是我搜集整理的,希望對尋找這方面信息的人有幫助![/
標簽: Java Interface Native java
上傳時間: 2014-01-25
上傳用戶:SimonQQ
Two 2D phase unwrapping approaches are included: 1. Phase quality guided path following method. 2. Goldstein's branch cut method. The algorithms are described in: D. C. Ghiglia and M. D. Pritt, Two-Dimensional Phase Unwrapping: Theory, Algorithms and Software. New York: Wiley-Interscience, 1998.
標簽: Unwrapping Phase 2D
上傳時間: 2016-04-30
上傳用戶:seanjsj
%球體 close all; G=6.67e-11; R=2;%球體半徑 p=4.0;%密度 D=10.0;%深度 M=(4/3)*pi*R^3*p;%質量 x=-20:1:20; g=G*M*D./((x.^2+D^2).^(3/2)); Vxz=-3*G*M*D.*x./((x.^2+D^2).^(5/2)); Vzz=G*M.*(2*D^2-x.^2)./((x.^2+D^2).^(5/2)); Vzzz=3*G*M.*(2*D^2-3.*x.^2)./((x.^2+D^2).^(7/2)); subplot(2,2,1) plot(x,g,'k-'); xlabel('水平距離(m)'); ylabel('重力異常值'); title('球體重力異常Δg'); grid on subplot(2,2,2) plot(x,Vxz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vxz'); grid on subplot(2,2,3) plot(x,Vzz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vzz'); grid on subplot(2,2,4); plot(x,Vzzz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vzzz'); grid on %% %水平圓柱體 close all G=6.67e-11; p=10.0;%線密度 D=100.0;%深度 x=-200:1:200; g=G*2*p*D./(x.^2+D^2); Vxz=4*G*p*D.*x./(x.^2+D^2).^2; Vzz=2*G*p.*(D^2-x.^2)./(x.^2+D^2).^2; Vzzz=4*G*p.*(D^2-3.*x.^2)./((x.^2+D^2).^3); subplot(2,2,1) plot(x,g,'k-'); xlabel('水平距離(m)'); ylabel('重力異常值'); title('水平圓柱體重力異常Δg'); grid on subplot(2,2,2) plot(x,Vxz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vxz'); grid on subplot(2,2,3) plot(x,Vzz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vzz'); grid on subplot(2,2,4); plot(x,Vzzz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vzzz'); grid on %% %垂直臺階 G=6.67e-11; p=4.0;%密度 h1=50.0;%下層深度 h2=40.0;%上層深度 x=-100:1:100; g=G*p.*(pi*(h1-h2)+x.*log((x.^2+h1^2)./(x.^2+h2^2))+2*h1.*atan(x./h1)-2*h2.*atan(x./h2)); Vxz=G*p.*log((h1^2+x.^2)./(h2^2+x.^2)); Vzz=2*G*p.*atan((x.*(h1-h2))./(x.^2+h1*h2)); Vzzz=2*G*p.*x*(h1^2-h2^2)./((h1^2+x.^2).*(x.^2+h2^2)); subplot(2,2,1) plot(x,g,'k-'); xlabel('水平距離(m)'); ylabel('重力異常值'); title('垂直臺階重力異常Δg'); grid on subplot(2,2,2) plot(x,Vxz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vxz'); grid on subplot(2,2,3) plot(x,Vzz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vzz'); grid on subplot(2,2,4); plot(x,Vzzz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vzzz'); grid on %% %傾斜臺階 G=6.67e-11; p=4.0;%密度 h1=50.0;%下層深度 h2=40.0;%上層深度 a=pi/6;%傾斜角度 x=-500:1:500; g=G*p.*(pi*(h1-h2)+2*h1.*atan((x+h1*cot(a))./h1)-2*h2.*atan((x+h2*cot(a))./h1)+x.*sin(a)^2.*log(((h1+x.*sin(a).*cos(a)).^2+x.^2.*sin(a)^4)./((h2+x.*(sin(a)*cos(a))).^2+x.^2.*sin(a)^4))); Vxz=G*p.*(sin(a)^2.*log(((h1*cot(a)+x).^2+h1^2)./((h2*cot(a)+x).^2+h2^2))-2*sin(2*a).*(atan((h1/sin(a)+x.*cos(a))./(x.*sin(a)))-atan((h2/sin(a)+x.^cos(a))./(sin(a).*x)))); Vzz=G*p.*(0.5*sin(2*a)^2.*log(((h1*cot(a)+x).^2+h1^2)./((h2*cot(a)+x).^2+h2^2))+2*sin(a)^2.*(atan((h1/sin(a)+x.*cos(a))./(x.*sin(a)))-atan((h2/sin(a)+x.*cos(a))./(x.*sin(a))))); Vzzz=2*G*p*sin(a)^2.*((x+2*h2*cot(a))./((h2*cot(a)+x).^2+h2^2)-(x+2*h1*cot(a))./((h1*cot(a)+x).^2+h1^2)); subplot(2,2,1) plot(x,g,'k-'); xlabel('水平距離(m)'); ylabel('重力異常值'); title('傾斜臺階重力異常Δg'); grid on subplot(2,2,2) plot(x,Vxz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vxz'); grid on subplot(2,2,3) plot(x,Vzz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vzz'); grid on subplot(2,2,4); plot(x,Vzzz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vzzz'); grid on %% %鉛錘柱體 G=6.67e-11; p=4.0;%密度 h1=50.0;%下層深度 h2=40.0;%上層深度 a=3;%半徑 x=-500:1:500; g=G*p.*((x+a).*log(((x+a).^2+h1^2)./((x+a).^2+h2^2))-(x-a).*log(((x-a).^2+h1^2)./((x-a).^2+h2^2))+2*h1.*(atan((x+a)./h1)-atan((x-a)./h1))-2*h2.*(atan((x+a)./h2)-atan((x-a)./h2))); Vxz=G*p.*log((((x+a).^2+h1^2).*((x-a).^2+h2^2))./(((x+a).^2+h2^2).*((x-a).^2+h1^2))); Vzz=2*G*p.*(atan(h1./(x+a))-atan(h2./(x+a))-atan(h1./(x-a))+atan(h2./(x-a))); Vzzz=2*G*p.*((x+a)./((x+a).^2+h2^2)-(x+a)./((x+a).^2+h1^2)-(x-a)./((x-a).^2+h2^2)+(x-a)./((x-a).^2+h1^2)); subplot(2,2,1) plot(x,g,'k-'); xlabel('水平距離/m') ylabel('重力異常值') title('鉛垂柱體重力異常') grid on subplot(2,2,2) plot(x,Vxz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vxz'); grid on subplot(2,2,3) plot(x,Vzz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vzz'); grid on subplot(2,2,4); plot(x,Vzzz); xlabel('水平距離(m)'); ylabel('導數值'); title('Vzzz'); grid on
上傳時間: 2019-05-10
上傳用戶:xiajiang
企鵝推冰塊游戲,A,D左右移動.K,M上下移動
標簽: 移動
上傳時間: 2015-01-10
上傳用戶:王者A
可以進行曲線回歸擬合算法的四參數算法。函數為 y = (a-d)/(1+(x/c)^b) +d . ec50.m 為其主要函數
上傳時間: 2016-02-04
上傳用戶:我干你啊
實現最優二叉樹的構造;在此基礎上完成哈夫曼編碼器與譯碼器。 假設報文中只會出現如下表所示的字符: 字符 A B C D E F G H I J K L M N 頻度 186 64 13 22 32 103 21 15 47 57 1 5 32 20 57 字符 O P Q R S T U V W X Y Z , . 頻度 63 15 1 48 51 80 23 8 18 1 16 1 6 2 要求完成的系統應具備如下的功能: 1.初始化。從終端(文件)讀入字符集的數據信息,。建立哈夫曼樹。 2.編碼:利用已建好的哈夫曼樹對明文文件進行編碼,并存入目標文件(哈夫曼碼文件)。 3.譯碼:利用已建好的哈夫曼樹對目標文件(哈夫曼碼文件)進行編碼,并存入指定的明文文件。 4.輸出哈夫曼編碼文件:輸出每一個字符的哈夫曼編碼。
上傳時間: 2014-11-23
上傳用戶:shanml
替代加密: A B C D E F G H I J K L M N O P Q R S T U V W 密文 Y Z D M R N H X J L I O Q U W A C B E G F K P 明文 X Y Z T S V I HAVE A DREAM!# 密文?? 用ARM編程實現替代加密。
標簽: 加密
上傳時間: 2016-07-17
上傳用戶:qq521