fcmshoal.m
来自「波浪数值模拟」· M 代码 · 共 43 行
M
43 行
xeta = [0:399]';y = [0:99];xc = 250;yc = 50;sigmax = 10;sigmay = 20hump = 0.1*exp( -0.5* ( ((xeta-xc).^2/sigmax^2)*ones(1,100) )) ; %+ ones(400,1)*(y-yc).^2/sigmay^2 ) );hump(1:200,:) = 0;sumhump = sum(sum(hump))/(400*100);hump = hump - sumhump;minc = min(min(hump));maxc = max(max(hump));save -ascii fCshoal.eta humphx2 = exp(- (xeta-120).^4/20^4 ); hy2 = exp(- (y-yc).^2/20^2 ); h2 = hx2 * hy2;hh = -0.25*h2 + ones(400,100); save -ascii fCshoal.depth hhfigure(1),clfsubplot(2,1,1)contour(xeta,y,hh')hold onpcolor(xeta,y,hump'),shading flatcaxis([minc maxc])colorbar('vert')xlabel('cross-shore location (m)')ylabel('alongshore location (m)')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?