31.08.2018 Views

Eduardo Kausel-Fundamental solutions in elastodynamics_ a compendium-Cambridge University Press (2006)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

216 MATLAB programs<br />

fout = fopen(‘SH2-FD.ezp’, ‘w’);<br />

fpr<strong>in</strong>tf (fout, ‘/et g “%s”\n’, tit);<br />

fpr<strong>in</strong>tf (fout, ‘/et x “%s”\n’, titx);<br />

fpr<strong>in</strong>tf (fout, ‘/sm off\n’);<br />

fpr<strong>in</strong>tf (fout, ‘/sd off\n’);<br />

fpr<strong>in</strong>tf (fout, ‘/og on\n’);<br />

fpr<strong>in</strong>tf (fout, ‘%15.5f %15.5f %15.5f\n’, [W;real(G);imag(G)]);<br />

fclose (fout);<br />

f = 1/(2*pi*mu);<br />

T1 = [0 1 1];<br />

T2 = [1+dt:dt:tmax];<br />

Uyy = f./sqrt(T2.ˆ2-1)+real(f./sqrt((T2.ˆ2-rˆ2)));<br />

Uyy = [0 0 <strong>in</strong>f Uyy];<br />

Uyy(3) = Uyy(4); % avoid s<strong>in</strong>gularity & discont<strong>in</strong>uity <strong>in</strong> plot<br />

T = [T1, T2];<br />

plot (T, Uyy);<br />

titx = ‘Dimensionless time, t*Cs/r’;<br />

xlabel(titx);<br />

title(tit);<br />

grid on;<br />

pause;<br />

% Create EasyPlot file<br />

fout = fopen(‘SH2-TD.ezp’, ‘w’);<br />

fpr<strong>in</strong>tf (fout, ‘/et g “%s”\n’, tit);<br />

fpr<strong>in</strong>tf (fout, ‘/et x “%s”\n’, titx);<br />

fpr<strong>in</strong>tf (fout, ‘/sm off\n’);<br />

fpr<strong>in</strong>tf (fout, ‘/sd off\n’);<br />

fpr<strong>in</strong>tf (fout, ‘/og on\n’);<br />

fpr<strong>in</strong>tf (fout, ‘%15.5f %15.5f\n’, [T;Uyy]);<br />

fclose (fout);<br />

close;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!