无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

使用S_TIDE繪制潮流橢圓并計算橢圓參數(shù)

2020-09-30 21:56 作者:ocean_tide  | 我要投稿

目前網(wǎng)上似乎沒有公開的代碼計算潮流橢圓參數(shù),給潮汐潮流分析帶來了不便。這里,我介紹一下我本人開發(fā)的新型潮汐潮流調(diào)和分析MATLAB工具包S_TIDE(?https://www.researchgate.net/project/A-non-stationary-tidal-analysis-toolbox-S-TIDE)里的潮流橢圓的有關函數(shù),希望能幫助到大家。

s_plot_tidal_ellipse.m是繪制潮流橢圓的函數(shù),有5個輸入?yún)?shù)uam,uph,vam,vph,tides,分別代表u方向分潮流流速振幅,u方向分潮流流速遲角,v方向分潮流流速振幅,v方向分潮流流速遲角,以及對應的分潮名字。s_estimate_tidal_ellipse.m是計算潮流橢圓參數(shù)的函數(shù),輸入?yún)?shù)同上,有6個輸出參數(shù)maxc,minc,maxt,mint,maxp,minp,分別代表最大分潮流流速(即橢圓長軸),最小分潮流流速(即潮流橢圓短軸),最大分潮流流速時刻(從0開始計時),最小分潮流流速時刻(從0開始計時),最大分潮流流速方向(即橢圓長軸與x軸正方向的夾角),最小分潮流流速方向(即橢圓短軸與x軸正方向的夾角)

例子:

uam=38.6;uph=247;

vam=25.0;vph=222;

s_plot_tidal_ellipse(uam,uph,vam,vph,{'M2'})

[maxc,minc,maxt,mint,maxp,minp]=s_estimate_tidal_ellipse(uam,uph,vam,vph,'M2') ;


%下面是我提供的一個動態(tài)實例(可以直接運行程序,然后你會看到潮流橢圓的生成過程)來幫助大家理解潮流橢圓要素的具體含義

uam=38.6;uph=247;

vam=25.0;vph=222;

tides={'M2'};

load t_constituents

ju=strmatch(upper(tides),const.name);

fu=const.freq(ju);

t=[0:1/12:36]; %from 0 hour to 36 hours 從0時刻到36小時

u=uam*cos(fu*t*2*pi-uph/180*pi);

v=vam*cos(fu*t*2*pi-vph/180*pi);

L=sqrt(u.^2+v.^2);

for i=1:160

subplot(2,1,1);plot(u(i),v(i),'k.');

title([ 'time=',num2str(t(i)),'hours'])

hold on;xlim([-40 40]);ylim([-30 30]);

xlabel('u(cm/s)','fontsize',12);ylabel('v(cm/s)','fontsize',12);

pause(0.04)

subplot(2,1,2);plot(t(i),L(i),'k.');hold on

xlim([t(1) t(160)]);ylim([-10 60])

xlabel('time(hours)','fontsize',12);ylabel('the speed of tidal current vector(cm/s)','fontsize',12)

pause(0.04)

end

[a1,a2]=findpeaks(L);maxt=t(a2);

[a3,a4]=findpeaks(-1*L);mint=t(a4);

maxc=max(L);minc=min(L);

line([t(a2(1)) t(a2(1))],[-10 maxc],'color','r');

%line([0 t(a2(1))],[maxc maxc],'color','r');

text(0.5,20,'maxt = 2.083 hour');

text(0.5,25,'maxc = 45.09')


line([t(a2(2)) t(a2(2))],[-10 maxc],'color','r');

%line([0 t(a2(2))],[maxc maxc],'color','r');

text(8.4,22,'maxt = 8.29 hour');

text(8.4,27,'maxc = 45.09')


line([t(a4(1)) t(a4(1))],[-10 minc],'color','r');

%line([0 t(a4(1))],[minc minc],'color','r');

text(4.5,22,'mint = 5.17 hour');

text(4.5,27,'minc = 9.05')


line([t(a4(2)) t(a4(2))],[-10 minc],'color','r');

%line([0 t(a4(2))],[minc minc],'color','r');

text(11,21,'mint = 11.38 hour');

text(11,26,'minc = 9.05')


subplot(2,1,1);line([-40 40],[0 0],'color','r');

line([0 0],[-30 30],'color','r');

line([u(a2(1)) u(a2(2))],[v(a2(1)) v(a2(2))]);

text(10,3,'31.76°')

text(5,-13,'There are two angles for maximum tidal currents','Fontsize',12)

text(7,-18,'One is 31.76°, the other is 31.76°+ 180°','Fontsize',12)


使用S_TIDE繪制潮流橢圓并計算橢圓參數(shù)的評論 (共 條)

分享到微博請遵守國家法律
定州市| 巴林左旗| 手游| 兴义市| 瑞丽市| 蓬安县| 桐柏县| 乌鲁木齐县| 常宁市| 阿尔山市| 海伦市| 苗栗县| 苏尼特右旗| 长葛市| 通渭县| 云林县| 新巴尔虎左旗| 新乐市| 萍乡市| 兴宁市| 西昌市| 剑阁县| 滨州市| 龙山县| 嵩明县| 瓮安县| 黄平县| 镇平县| 外汇| 宣城市| 同心县| 广德县| 友谊县| 芜湖市| 改则县| 高密市| 郓城县| 辉县市| 高淳县| 大兴区| 楚雄市|