马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
clc;
clear;
x=random('norm',2,0.03,1,41);
y=random('norm',2,0.03,1,41);
figure(1)
plot(x,y,'.')
c0=340;
f=1000;
w=2*pi*f;
k0=0;
M=41;
syms kx ky
km=[kx,ky];
W=0;
image=sqrt(-1);
for m=1:41
rm=[x(m),y(m)];
pm=dot(km,rm);
qm=exp(image*pm);
W=W+qm
end
figure(2)
ezcontourf(W)
colorbar
图2总是出问题,显示如下:
【??? Operands to the || and && operators must be convertible to logical scalar values.
Error in ==> specgraph.contourgroup.schema>LdoDirtyAction at 256
refresh(h);
??? Error occurred while evaluating listener callback.】 |