计算全息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