From: someone on 23 Feb 2010 00:00 mijie <mijie7(a)gmail.com> wrote in message <e0168644-2a84-4480-88b0-d65c791304b6(a)g11g2000yqe.googlegroups.com>... > Hi, > do me a favor, please? What kind of a favor do you want? Do you have a question to ask about the following code? Are you getting the error mesage in your subject line? At what line of the code do you get the error message? If tou want help, give us a hint at what you want! > > clear all > close all > > % create a code for decline vertical lines > > lambda = 543e-9; > pixel = 13.68e-6; > xdim = 1024; > ydim = 768; > > % create a range of z so that the line will be xx degree of vertical > > z = 0.48; > a = ydim*pixel; > b = a*tan((60/180)*pi); > maxz = z + b; > fractionz = b/(ydim-1); > > > % create a range of radius if the circle. > > rmin = -(pixel*(xdim/2))+pixel; > rmax = +pixel*(xdim/2); > r=rmin:pixel:rmax; > r2= r.^2; > > % calculate the data for H. > > for c=1:768 > Rz = z+((c-1)*fractionz); > numerator = 1i*r2.*pi; > denumerator = Rz.*lambda; > H(c) = exp(numerator/denumerator); > end > > plot (r,real(H)); > > ah=real(H); > bah=ah>0; > hold on; > plot (r,ah); > plot (r,bah,'r'); > hold off; > > % setting up the vertical lines > > for i = 1:768; > dmd(i,:)=bah; > end; > > > cheerio, > mijie
From: Kian on 23 Feb 2010 00:33 Line 33 change to: H(c,:) = exp(numerator/denumerator); instead of: H(c) = exp(numerator/denumerator);
|
Pages: 1 Prev: NEED help IEEE 802.16-2004 simulink model about parameter and model Next: hi |