oscar_roma.m

来自「spectral element method」· M 代码 · 共 43 行

M
43
字号
fmax = 20;[RHO,cs,eta,h]=textread('Oscar_Roma.tab','%*s%f%*f%f%f%f',...                'commentstyle','matlab');Q = 1./(2*eta);cs2=[cs' ;cs'];cs2=cs2(:);h(end) = cs(end)/fmax;h2=[h' ;h'];h2=h2(:);dep=cumsum(h);dep2=[[0;dep(1:end-1)]';dep'];  dep2=dep2(:);subplot(131)plot(cs2,-dep2)ylabel('z (m)')xlabel('c_s (m/s)')title('SH velocity model')axis([0 1500 -inf 0])subplot(132)hol = h2./(cs2/fmax);nel2 = ceil(hol);plot( nel2,-dep2, '--',hol,-dep2 )xlabel('H / \lambda_{min} = H f_{max}/c_s')legend('Elements per layer',4)title(sprintf('%s\n%s',...     'For mesh generation with f_{max} = 20 Hz',...     '(resolution/dispersion criterion)'))axis([0 7 -inf 0])subplot(133)dt = h2./nel2./cs2;dt = dt/max(dt);plot( dt, -dep2)xlabel('\Delta t / \Delta t_{max}')title(sprintf('%s\n%s',...     'For time step selection',...     '(stability criterion)'))axis([0 1.2 -inf 0])nel = nel2(1:2:end);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?