👨🎓个人主页:研学社的博客
💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
📚2 运行结果
运行视频:
模拟几架无人机仿真(Matlab代码实现)_哔哩哔哩_bilibili
部分代码:
function cloudplot(cloud,t)
%
% cloudplot(cloud,t)
%
% Contour plot of cloud in current window
%
% store contour handles as persistent to delete them each time
persistent c h
try
delete(h)
end
% need to permute
pp = permute(cloud.p,[3 1 2]);
% now interpolate in time which is first dimension
pf = squeeze(interp1(cloud.t,pp,t));
% and draw contours
[c, h] = contour(cloud.x,cloud.y,pf,(0.5:0.5:3));
colorbar('EastOutside')
axis equal
axis([min(cloud.x) max(cloud.x) min(cloud.y) max(cloud.y)])
pause(0.01)
function p=cloudsamp(cloud,x,y,t)
%
% p=cloudsamp(cloud,x,y,t)
%
% simulate concentration sample from pollutant cloud
%
% "cloud" should have elements p,x,y,t from dispersal simulation
% Sample relates to time t at position x,y
%
% simple interpolation in 3D
p = interp3(cloud.x,cloud.y,cloud.t,cloud.p,...
x,y,t);
% warning if time too late
if t>max(cloud.t),
warning('cloudsamp: time out of range. Extrapolations could be weird.')
end
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1]陆泉望. 小型无人机控制与仿真环境快速原型设计技术研究[D].南京航空航天大学,2013.