focalmech(fm, centerX, centerY, diam, varargin)

version 1.6.0.0 (5.31 KB) by James Conder
Draw a full moment tensor focal mechanism for an earthquake

744 Downloads

Updated Tue, 10 Sep 2019 16:16:02 +0000

View License

Function takes 3x3 or vector of 6 independent elements of a moment tensor and plots the appropriate beachball for that earthquake
Example:
% Ryukyu Islands earthquake 4/18/2008 (from globalcmt.org)
M = [4.070 -1.830 -2.240 1.500 1.410 -1.110];
Mw = 5.0;
figure(1)
clf
focalmech(M,0,0,Mw)
axis equal
% Mt. Carmel aftershock 4/18/2008
M = [ -0.754 2.250 -1.490 -0.435 -0.094 0.730 ];
Mw = 4.6;
focalmech(M,5.2,0,Mw)
set(gca,'Visible','off')

Cite As

James Conder (2022). focalmech(fm, centerX, centerY, diam, varargin) (https://www.mathworks.com/matlabcentral/fileexchange/61227-focalmech-fm-centerx-centery-diam-varargin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!