% 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
%
壓縮目錄下的Test_USB_Test.exe是PC側(cè)的應(yīng)用程序,dsp5509_10MHz_clk.out、dsp5509_12MHz_clk.out、和dsp5509_16MHz_clk.out是分別針對(duì)5509時(shí)鐘為10M、12M和16M的out文件。基于ccs2.2開(kāi)發(fā)。
在ccs2.2中l(wèi)oad針對(duì)自己硬件平臺(tái)的.out文件,用USB線(xiàn)連接好5509與PC,運(yùn)行.out,會(huì)提示檢測(cè)到USB設(shè)備,指定driver目錄下的驅(qū)動(dòng)即可。
再運(yùn)行Test_USB_Test.exe,其操作格式為T(mén)est_USB_Test.exe w 32 r 32
即從PC向dsp寫(xiě)入32個(gè)字符,再讀取32個(gè)5509返回的字符,在dsp上將輸入的字符做了簡(jiǎn)單的+1操作。
看n2實(shí)例 #Create a simulator object
set ns [new Simulator]
#Define different colors for data flows
#$ns color 1 Blue
#$ns color 2 Red
#Open the nam trace file
set nf [open out-1.nam w]
$ns namtrace-all $nf
set f0 [open out0.tr w]
set f1 [open out1.tr w]
#Define a finish procedure
proc finish {} {
global ns nf
$ns flush-trace
#Close the trace file
close $nf
#Execute nam on the trace file
exit 0
}
#Create four nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
#Create links between the nodes
$ns duplex-link $n0 $n2 1Mb 10ms