plot_seis.m
来自「Spectral Element Method for wave propaga」· M 代码 · 共 32 行
M
32 行
% PLOT_SEIS%% plot_seis(x,t,v)% plot_seis(x,dt,v)%% INPUT x(nx) linear position of receivers% t(nt) time % dt timestep% v(nt,nx) seismograms%function plot_seis(x,t,v)[NT,NX] = size(v);if length(x)~=NX, error('x and v have incompatible sizes'), endif length(t)==1 t = [0:NT-1]'*t;elseif length(t)~=NT error('t and v have incompatible sizes')endampli = 0.5*max(abs( v(:) ));disp(sprintf('Amplitude scale (trace to trace) = %g',ampli))if ampli>0 offset = max(abs(diff(x))); ampli = offset/ampli;endplot(t, v*ampli +repmat(x(:)',NT,1) );title('SEM Seismograms')xlabel('Time (s)')ylabel('Distance (m)')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?