上述实验指导书的PDF文件下载:地震勘探原理 实验1
以下是P_and_S_waves.m的matlab程序
function P_and_S_waves
clear all
close all
f = 2;
T = 1/f;
omega = 2*pi*f;
vel = 3000;
%xg =[-1.5,1.5]
%zg =[0,0]
% Set up array of depths
x1 = [0:150:5000];
x2 = x1;
nx = length(x1);
k = 2*pi*f/vel;
%Start time step loop
n=40;
M=moviein(n);
for it=1:n
t=T*(it)/n;
for ix=1:nx
A1(i