matlab中怎么去掉psd曲线的某一段,谢谢
我做的psd曲线的开头部分是高频段,我想要去掉这段,怎么编程呢?就是图中0.1~1这段曲线,其他部分不变。谢谢各位高手。clear all; syms s1 s2 zz lamda alpha c a w;
C=10^-14; Z=50:10:300;
k=2*pi/lamda; rho=(0.545*c^2*k^2*zz)^(-3/5);
f1=k^2/(zz^2)*s1*s2;
f2=exp(j*k/(2*zz)*(s1^2-s2^2))*exp(-1/rho^2*(s1^2+s2^2))*besseli(0,2*s1*s2/rho^2);
sgb=besselj(0,alpha*s1)*besselj(0,alpha*s2)*exp(-s1^8/w^8)*exp(-s2^8/w^8);
f=f1*f2*sgb;%integrand
f=subs(f,{zz,lamda,alpha,c,w},{Z,1550*10^-9,600,C,0.05}); disp(f);
intValue=ones(size(Z));
for i=1:length(Z), disp(i); ff=inline(f(i));
intValue(i)=dblquad(ff,0,1,0,1,10^-20);
end;
plot(Z',abs(intValue))
[ 本帖最后由 ChaChing 于 2009-2-24 21:34 编辑 ] 在图里面去掉的话,只需要把plot(x,y)中的y值设置成NaN就不画出图来了。
回复 楼主 zp3740233 的帖子
怎麽我试跑, 一大堆警告!回复 板凳 ChaChing 的帖子
确实如此,电脑都快卡死了……不好意思,我传上去的程序不是这样的,是乱码了吧 我再传一次,麻烦大家帮忙看看
先谢谢楼上各位的热心帮助了,sogooda将y改为NaN后整个图就没有了,我是想把图中前面一段去掉,就是图中横坐标对应的0.1~1这段曲线。我把程序直接放在下面吧,再次谢谢各位了。
fz=[ 1.43376 0.69393 -0.25528 1.37453 1.00264 0.49115 1.01610 0.76078 1.24082 1.99383 1.09090 -3.30334 -3.55823 -2.48473 -0.98362 -0.69886 1.30384 1.68661 0.90965 2.34295 2.56134 2.40658 0.90916 -1.38407 -3.48915 -3.35881 -1.74176 -0.27230 0.09595 -1.09758 -0.41104 0.90685 1.26109 2.65646 2.10720 1.67299 1.26378 1.55766 0.74798 -2.36920 -2.69915 -2.73639 -1.97327 -2.11704 -0.89280 1.50410 3.18689 2.52305 0.20564 -0.51121 -0.72133 -1.58035 -1.36359 0.86662 1.93534 0.31555 0.47457 1.54613 1.58336 1.36329 -0.69690 -2.14770 -1.58573 -1.88538 -1.25212 -1.08407 -1.66728 -1.44180 1.00759 3.02269 2.84978 2.53697 2.00460 1.33167 -0.03065 -0.79133 -1.12260 -2.13614 -2.61968 -1.92351 -1.64922 -0.74003 1.00055 2.32780 2.43839 2.09502 0.55544 -0.09799 -1.71155 -1.56186 -0.18618 -0.44458 0.00725 0.17952 0.21622 -0.19739 -0.82023 -1.14363 -0.27500 0.22471 2.16321 2.87439 1.98281 0.50915 -0.72145 -1.05870 -1.59311 -2.29463 -1.55632 0.08655 0.61472 -0.36552 -0.47903 -0.75582 1.43098 1.77356 1.03596 -0.12533 -0.74467 -0.01320 0.83992 1.49380 1.61006 0.97395 -0.06107 -0.86348 -2.73995 -2.35382 -2.54569 -1.68443 0.27463 0.89026 1.84985 1.76063 0.34692 0.86636 0.73295 -0.10062 -0.32787 -0.47890 0.16679 0.25511 0.80058 1.47784 2.26910 0.91114 -1.88396 -3.16914 -2.96201 -1.73954 -1.34562 -0.91808 0.40838 0.34321 0.21020 1.58203 3.19915 3.51552 1.78876 0.87548 -0.92476 -0.36852 -0.93410 -1.13490 0.26121 0.47817 -0.46553 -2.30956 -4.18415 -2.84411 -0.86076 0.72911 1.73661 1.41738 1.84671 1.98707 1.65257 1.25638 1.66270 1.57009 1.22635 0.22133 -1.04565 -3.11305 -2.59435 -2.50572 -2.26381 -1.43726 -0.60569 0.43719 1.93362 2.02897 0.53750 0.42266 0.74525 0.52877 0.25201 0.68194 1.51116 1.05082 0.40692 -0.02014 -0.24197 -1.60743 -0.96447 0.49020 -1.96287 -2.93349 -1.71851 -1.28458 -0.09511 0.51933 0.83139 1.96032 1.88783 1.38045 1.05498 1.00313 1.13265 0.27057 -0.10603 -1.34415 0.00761 0.56597 0.48018 -1.57649 -3.19870 -3.60054 -2.61413 -1.38269 0.16557 1.65189 2.70833 3.32955 2.35340 2.41069 1.64531 0.58277 -0.63618 -0.92966 -1.12669 -0.91314 -1.72708 -2.64896 -2.38401 -2.18230 -0.71005 1.07340 2.14620 2.53895];
=psd(fz,length(fz),25);
figure(2)
loglog(f,p,'-r')
title('yuanlai')
[ 本帖最后由 zp3740233 于 2009-2-25 10:12 编辑 ] 不确定是否LZ要的
figure; loglog(f,p,'-r'); title('yuanlai'); axis()
[ 本帖最后由 ChaChing 于 2009-2-25 11:58 编辑 ]
谢谢主任了
以后会常来学习讨论的。
页:
[1]