計算全息close all clc clear A=zeros(64) A(15:20,20:40)=1 A(15:50,20:25)=1 A(45:50,20:40)=1 A(30:34,20:35)=1 % ppp=exp(rand(64)*pi*2*i) A=A.*ppp % Author s email: zjliu2001@163.com figure imshow(abs(A),[]) Fa=fft2(fftshift(A)) Fs=fftshift(Fa) Am=abs(Fs) % amplitude Ph=angle(Fs) % phase s=11 % 這表示邊長嗎? cgh=zeros(64*s) th=max(max(abs(Fs)))
上傳時間: 2014-10-13
上傳用戶:wweqas
load initial_track s; % y:initial data,s:data with noiseT=0.1; % yp denotes the sample value of position% yv denotes the sample value of velocity% Y=[yp(n);yv(n)];% error deviation caused by the random acceleration % known dataY=zeros(2,200);Y0=[0;1];Y(:,1)=Y0;A=[1 T 0 1]; B=[1/2*(T)^2 T]';H=[1 0]; C0=[0 0 0 1];C=[C0 zeros(2,2*199)];Q=(0.25)^2; R=(0.25)^2;
上傳時間: 2014-12-28
上傳用戶:asaqq
The Reed-Somolon code is specified by the finite field, the length (length <= 2^m-1), the number of redundant symbols (length-k), and the initial zero of the code, init_zero, such that the zeros are: init_zero, init_zero+1, ..., init_zero+length-k-1
標簽: length the Reed-Somolon specified
上傳時間: 2014-07-31
上傳用戶:skfreeman
平均因子分解法,適用于正定矩陣First, let s recall the definition of the Cholesky decomposition: Given a symmetric positive definite square matrix X, the Cholesky decomposition of X is the factorization X=U U, where U is the square root matrix of X, and satisfies: (1) U U = X (2) U is upper triangular (that is, it has all zeros below the diagonal). It seems that the assumption of positive definiteness is necessary. Actually, it is "positive definite" which guarantees the existence of such kind of decomposition.
標簽: 分解
上傳時間: 2013-12-24
上傳用戶:啊颯颯大師的
標準的遺傳算法代碼,下面是程序:function y=fitness(chrom,p,aim) global P_cross P_mutation [Popsize len]=size(chrom) fitness_gene=zeros(Popsize,1) in_he=zeros(4,1) out_he=zeros(4,1) in_out=0 out_out=0
上傳時間: 2013-12-08
上傳用戶:pkkkkp
function [U,center,result,w,obj_fcn]= fenlei(data) [data_n,in_n] = size(data) m= 2 % Exponent for U max_iter = 100 % Max. iteration min_impro =1e-5 % Min. improvement c=3 [center, U, obj_fcn] = fcm(data, c) for i=1:max_iter if F(U)>0.98 break else w_new=eye(in_n,in_n) center1=sum(center)/c a=center1(1)./center1 deta=center-center1(ones(c,1),:) w=sqrt(sum(deta.^2)).*a for j=1:in_n w_new(j,j)=w(j) end data1=data*w_new [center, U, obj_fcn] = fcm(data1, c) center=center./w(ones(c,1),:) obj_fcn=obj_fcn/sum(w.^2) end end display(i) result=zeros(1,data_n) U_=max(U) for i=1:data_n for j=1:c if U(j,i)==U_(i) result(i)=j continue end end end
標簽: data function Exponent obj_fcn
上傳時間: 2013-12-18
上傳用戶:ynzfm
44b0公版的測試程序, ******************************************************* * NAME : 44BINIT.S * * Version : 10.JAn.2003 * * Description: * * C start up codes * * Configure memory, Initialize ISR ,stacks * * Initialize C-variables * * Fill zeros into zero-initialized C-variables *
上傳時間: 2013-12-22
上傳用戶:teddysha
FFTGUI Demonstration of Finite Fourier Transform. FFTGUI(y) plots real(y), imag(y), real(fft(y)) and imag(fft(y)). FFTGUI, without any arguments, uses y = zeros(1,32). When any point is moved with the mouse, the other plots respond. Inspired by Java applet by Dave Hale, Stanford Exploration Project, http://sepwww.stanford.edu/oldsep/hale/FftLab.html
標簽: FFTGUI real Demonstration Transform
上傳時間: 2017-06-05
上傳用戶:anng
批處理感知器算法的代碼matlab w1=[1,0.1,1.1;1,6.8,7.1;1,-3.5,-4.1;1,2.0,2.7;1,4.1,2.8;1,3.1,5.0;1,-0.8,-1.3; 1,0.9,1.2;1,5.0,6.4;1,3.9,4.0]; w2=[1,7.1,4.2;1,-1.4,-4.3;1,4.5,0.0;1,6.3,1.6;1,4.2,1.9;1,1.4,-3.2;1,2.4,-4.0; 1,2.5,-6.1;1,8.4,3.7;1,4.1,-2.2]; w3=[1,-3.0,-2.9;1,0.5,8.7;1,2.9,2.1;1,-0.1,5.2;1,-4.0,2.2;1,-1.3,3.7;1,-3.4,6.2; 1,-4.1,3.4;1,-5.1,1.6;1,1.9,5.1]; figure; plot(w3(:,2),w3(:,3),'ro'); hold on; plot(w2(:,2),w2(:,3),'b+'); W=[w2;-w3];%增廣樣本規范化 a=[0,0,0]; k=0;%記錄步數 n=1; y=zeros(size(W,2),1);%記錄錯分的樣本 while any(y<=0) k=k+1; y=a*transpose(W);%記錄錯分的樣本 a=a+sum(W(find(y<=0),:));%更新a if k >= 250 break end end if k<250 disp(['a為:',num2str(a)]) disp(['k為:',num2str(k)]) else disp(['在250步以內沒有收斂,終止']) end %判決面:x2=-a2*x1/a3-a1/a3 xmin=min(min(w1(:,2)),min(w2(:,2))); xmax=max(max(w1(:,2)),max(w2(:,2))); x=xmin-1:xmax+1;%(xmax-xmin): y=-a(2)*x/a(3)-a(1)/a(3); plot(x,y)
上傳時間: 2016-11-07
上傳用戶:a1241314660
已知系統函數為H(z)=1/[(1-0.2z^-1)(1-0.3z^-1)(1+0.4z^-1)]。試用長除法求h(n)的6點輸出。 答案:clc;clear all;b=1;a=poly([0.2,0.3,-0.4]);x=deconv([1,zeros(1,6+4-1-1)],a)
上傳時間: 2017-10-21
上傳用戶:zhouhua