代码拉取完成,页面将自动刷新
yaw = 0:10:360;
pitch = -90:10:90;
waveenv = WaveEnv();
[X,Y ]= meshgrid(yaw,pitch);
Z = zeros(length(pitch),length(yaw));
for p = 1:length(pitch)
for y = 1:length(yaw)
int = waveenv.getIntensityByYP(-0.5,0.5,yaw(y),pitch(p),0);
Z(p,y) = int;
end
end
figure
mesh(X,Y,Z)
xlabel('yaw')
ylabel('ptich')
%每一列的最大值
[val,rows]=max(Z);
[mv,col]=max(val);
[x,y] = find(Z==mv,1);
[yaw(y),pitch(x),mv]
% 220.0000 20.0000 1.5869e-07
% 40.0000 -20.0000
% figure
% y = zeros(length(pitch),1);
% for p = 1:length(pitch)
% int = env.getIntensityByYP(-0.5,0.5,0,pitch(p),0);
% y(p) = int;
% end
% plot(pitch,y)
% figure
% q = zeros(length(yaw),1);
% for y = 1:length(yaw)
% int = env.getIntensityByYP(-0.5,0.5,yaw(y),30,0);
% q(y) = int;
% end
% plot(yaw,q)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。