0% found this document useful (0 votes)
55 views

Matlab Introd

MATLAB is a programming tool for numerical and symbolic computations and data analysis. It was originally created in the 1970s by Cleve Moler to make matrix libraries more accessible to students. The document provides an introduction to basic MATLAB features including its structure, core libraries and toolboxes, command window, variables, indexing, and mathematical functions. It recommends purchasing a tutorial book to learn more about MATLAB's extensive capabilities.

Uploaded by

marcelo_fis_mat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Matlab Introd

MATLAB is a programming tool for numerical and symbolic computations and data analysis. It was originally created in the 1970s by Cleve Moler to make matrix libraries more accessible to students. The document provides an introduction to basic MATLAB features including its structure, core libraries and toolboxes, command window, variables, indexing, and mathematical functions. It recommends purchasing a tutorial book to learn more about MATLAB's extensive capabilities.

Uploaded by

marcelo_fis_mat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 16

Fundamentals of Structural Geology

Exercise: introduction to MATLAB


Exercise: introduction to MATLAB
The following is a brief introduction to a few of the elementary features and functions of
MATLAB designed to get a student started along the learning path. It is recommended that you
purchase a book that offers a tutorial and reference guide to MATLAB such as:
Mastering MATLAB, !", #anselman, $.%. and Littlefield, B., &earson 'ducation, Inc.
(&rentice #all), *+,p.
1
What is it?
MATLAB stands for Matri- Laboratory. MATLAB is a programming tool that pro.ides an
interacti.e en.ironment for numerical and symbolic computations along with a wide .ariety of
data analysis and .isuali/ation tools.
2 History
MATLAB was concei.ed in the "01!s by %le.e Moler, who wanted to make se.eral 234T4A5
matri- libraries more accessible to his students at 65M. Thus he wrote MATLAB. In "0*7 Moler
8oined forces with 9ohn Little (:tanford 6ni.ersity) and others to write a professional .ersion
with graphics functionality. In "0*, The Math;orks Inc. was founded and MATLAB has been
e.ol.ing and impro.ing rapidly since then.
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ 1
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
Academic discounts for faculty are a.ailable for indi.idual, group, concurrent, and classroom
licenses from The Math;orks Inc. at:
http:<<www.mathworks.com<
$iscounts also are a.ailable for students.
3 MATLAB structure
3.1 MATLAB core libraries
These are the main programs, functions, and commands used in MATLAB.
3.2 Toolboxes
These are special purpose libraries of programs which are sold and licensed separately by The
Math;orks Inc. and include:
:tatistics Toolbo-
:ymbolic Math Toolbo-
&artial $iferential '=uation Toolbo-
:ignal &rocessing Toolbo-
Image &rocessing Toolbo-
and many more.
3.3 The User
There are two ways the user can interact with MATLAB:
". Type into the MATLAB command window
. ;rite your own programs using script and function m>files.
4 Using MATLAB
3pen MATLAB on your computer and study the workspace that is pro.ided.
4.1 At rst glance
The default appearance is three windows in a graphical user interface (?6I):
%ommand ;indow
;orkspace
%ommand #istory
@ou can arrange these howe.er you want and you only need to ha.e the %ommand ;indow
open. It is con.enient to ha.e the %urrent $irectory window open. If you intend to call .ariables
or data Ales stored in a certain directory, that directory must be open as the %urrent $irectory.
5ote the :tart button in the lower left corner of the MATLAB window. This is used to start
$emos, #elp, $esktop Tools, MATLAB toolbo-es, and other primary functions of MATLAB.
The symbol BB is the standard prompt in the MATLAB %ommand ;indow. A good way to begin
learning MATLAB is to start typing to the right of the prompt and read the response. There is an
e-tensi.e help function that pro.ides information about commands. 2or e-ample you can learn
about the general commands and functions in MATLAB by typing:
BB help general
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ 2
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
The response has been suppressed for bre.ity here. 3r you can learn about the e-ponential
function by typing:
BB help e-p
'C& '-ponential.
'C&(C) is the e-ponential of the elements of C, e to the C.
2or comple- DECFiG@, 'C&(D) E 'C&(C)G(%3:(@)FiG:I5(@)).

:ee also e-pm", log, log"!, e-pm, e-pint.
3.erloaded functions or methods (ones with the same name in other directories)
help sym<e-p.m
4eference page in #elp browser
doc e-p
BB
To get the scoop on the help function itself you would type:
BB help help
The response has been suppressed for bre.ity here. :electing MATLAB #elp under #elp in the
menu bar at the top of the ?6I ;indow pro.ides an abundance of helpful tips. Also a.ailable on
the #elp menu are:
6sing the $esktop
6sing the %ommand ;indow
$emos
After finishing this introduction ha.e a look at these features to e-tend your knowledge of
MATLAB.
4.2 Constants
MATLAB recogni/es many commonly used constants, such as:
pi H, the ratio circumference<diameter of a circle
nan 5ot>A>5umber, the ratio !<!
eps the smallest number such that "Feps B "
the double precision accuracy of your computer
usually smaller than
I"+
The .alues of pi and eps are displayed with , digits after the decimal point. To increase the
number of digits displayed to ", type:
BB format long
Look again at pi and eps. To return to the standard precision type:
BB format short
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ ,
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
The command format does not affect how MATLAB computations are done. %omputations on
floating point .ariables are done in the appropriate floating point precision, no matter how those
.ariables are displayed.
4.3 Variables
Jariables are broadly classified in MATLAB as scalars (with a single numerical .alue), .ectors
(with more than one .alue organi/ed in one dimension) and arrays (with multiple numerical
.alues organi/ed in more than one dimension).

:calars are defined as:

BB aE+
a E
+
3r, one could define the scalar b as:
BB bE7K
5ote that ending a command line with the semi>colon suppresses the response that gi.es the
.alue of the scalar. 3f course scalars can be thought of as .ectors of length one.
4ow and column .ectors are defined as:
BB rEL,M,77,1,,*N
r E
,M 77 1 ,*
BB cEL,MK77K1K,*N
c E
,M
77
1
,*
5ote the use of the comma to separate elements in the definition of the row .ector and the semi>
colon to separate elements in the definition of the column .ector. The row .ector can be defined
using a space between each element instead of the comma.
Matrices are two dimensional arrays. 2or e-ample, the matri- A is defined:
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ "
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
BB AEL"" " "7K" 7K7" 7 77K ," , ,7N
A E
"" " "7
" 7
7" 7 77
," , ,7
5ote the elements of a gi.en row are separated from those of the ne-t row by a semi>colon. Also
note the use of lower case names for scalars and .ectors, and upper case names for matrices. This
is not a necessary synta-, but some con.ention to help distinguish arrays of more than one
dimension can be helpful. The general notion of arrays continues to three or more dimensions.
There are many useful functions for managing .ectors and arrays. These can be re.iewed by
typing:
BB help elmat
2or e-ample, the function length returns the number of .alues in a .ector:
BB eElength(r)
e E
,
The function ndims returns the number of dimensions of an array:
BB fEndims(A)
f E

The function si/e returns the number of rows and columns of an array:
BB gEsi/e(A)
g E
, 7
4.4 Indexing
Most of the data used in MATLAB consists of .ectors and arrays and at times only a subset of
numbers are of interest. This is where inde-ing becomes important. 3ne of the most useful
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ +
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
operators in this conte-t is the colon. 2or e-ample, to create a row .ector containing the integers
from + to " we write:
BB +:"
ans E
+ 1 * 0 "! "" "
An increment other than one can be specified as follows:
BB +::"
ans E
+ * "! "
2or e-ample, if only the Arst , .alues of a .ector, -, of length * are needed in a calculation the
subset, -sub, may be defined using the colon operator:

BB -EL" 1+ 07 ,, M1 M "" 0*NK
BB -subE-(":,)
-sub E
" 1+ 07 ,,
4ecall the matri- A and use the colon by itself to specify all of the elements in column :
BB A
A E
"" " "7
" 7
7" 7 77
," , ,7
BB A(:,)
ans E
"

7
,
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ -
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
;hat would you e-pect as a result for A(:,:)O
If only the .alues in rows through 7 and in columns " through are needed from the matri- A
that has , rows and 7 columns, the subset, A:6B, is defined:
BB A:6BEA(:7,":)
A:6B E
"
7" 7
To select an inter.al through the last .alue in the rows and in the columns use, for e-ample:

BB A:6BEA(:end,7:end)
A:6B E
7
77
,7

The find() command e.aluates any mathematical or logical e-pression, which is entered in the
parentheses, and returns the indices of an array of numbers for which the e-pression is true. 2or
e-ample, to find the indices of .alues of - greater than M! use:
BB -bigEfind(-BM!)
-big E
7 M *
5ote that it is the indices returned and not the .alues of the elements with those indices. To find
the .alues use:
BB -(-big)
ans E
1+ 07 M1 0*
2or loops repeat a calculation a certain number of times. 2or e-ample, letPs multiply times the
* elements of the .ector -. The 2or loop begins by setting a counter, i, that .aries o.er the
re=uired range, here " to *, and ends with the statement end. Between the 2or and the end you
write the calculations with the particular .alue of - designated as -(i).
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ .
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
BB for iE":length(-)
-(i)EG-(i)K
end
BB -
- E
, "M "*+ ** "", M! "0+
4. Mathe!atical "#nctions
'lementary math functions may be re.iewed by typing:
BB help elfun
MATLAB pro.ides an e-tensi.e set of mathematical functions including all of the standard
arithmetic, trigonometric, e-ponential, comple-, and speciali/ed functions. 2or e-ample consider
the trigonometric e=uation:
( ) ( ) sin cos t x x =
In MATLAB this can be written for the scalar - as follows gi.en an angle of ,M degrees:
BB -E,MGpi<"*!K
BB tEsin(-)Gcos(-)
t E
!.M!!!
5ote the angle ,M (degrees) is con.erted to radians because trigonometric functions e-pect
arguments as radians.
5ow consider the following .ector e=uation:
( ) ( ) sin cos , ",
i i i
T x x i n = =
2or the .ector xi with n E , uniformly spaced .alues from ! to pi, this function is e.aluated:
BB CElinspace(!,pi,,)K
BB TEsin(C).Gcos(C)
T E
! !.,77! >!.,77! >!.!!!!
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ /
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
5ote the multiplication operator .G which is used to multiply each element of a .ector by the
corresponding element of a .ector of the same length. This times operator also is used for
element>by>element multiplication of matrices. If A is a matri- of order Lm by nN and B is a
matri- of order Lm by nN, then A .G B produces a matri- that also is of order Lm by nN as follows:
"" " " "" " " "" "" " " " "
" " " "
" " " "
n n n n
n n n n
m mn m mn m m mn mn
A A A B B B A B A B A B
A A A B B B A B A B A B
A A B B A B A B



=



K K K
K K K
M M O M M M O M M M O M
K K K K K K
In contrast, the multiplication operator G is used to multiply a matri- by a .ector, or a matri- by a
matri-, using the rules of linear algebra, as we will see below.
4.$ Linear algebra
'lementary matri- functions may be re.iewed by typing:
BB help matfun
2or e-ample, consider matri->.ector multiplication of an Lm by nN matri-, B, by an Ln by "N
column .ector, -, using the mtimes operator G that produces an Lm by "N column .ector:
"" " " " "" " " " "
" " "
" " "
n n n
n n n
m mn n m m mn n m
B B B x B x B x B x y
B B B x B x B x B x y
B B x B x B x B x y
+ + +

+ + +

= =


+ + +

K L
K L
M M O M M M M
K K L

This produces a column .ector y of length m with elements that are the sum of the products of
the elements from successi.e rows of B with the corresponding elements from the column of -.
This is accomplished in MATLAB as follows:
BB BEL"" " "7K" 7K7" 7 77NK
BB -EL"KK7NK
BB yEBG-
y E
1,
"7,
"0,
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ 0
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
The mtimes operator enables matri->matri- multiplication, for e-ample AGB, if the order of A is
Lm by pN and the order of B is Lp by nN. The number of columns in A must e=ual the number of
rows in B, and the order of the resulting product matri- is Lm by nN.
3ne of the many useful linear algebra and matri- functions is eig which operates on a s=uare
matri- C with the following synta-:

LJ,$N E eig(C)
This function produces a diagonal matri- $ of eigen.alues and a full matri- J whose columns
are the corresponding eigen.ectors. This function has important applications in structural
geology where it is used to operate on the stress or strain tensor. These tensors are 7-7 symmetric
matrices: the eigen.alues are the so>called principal .alues, and the orientations of the principal
stresses or strains are gi.en by the eigen.ectors.
:uppose you are gi.en the si- independent components of a stress tensor in %artesian
coordinates. The principal .alues and directions are found as follows:
BB s-- E K syy E "K s// E .MK s-y E .1MK sy/ E .MK s/- E .MK
BB : E Ls-- s-y s/-K s-y syy sy/K s/- sy/ s//N
: E
.!!!! !.1M!! !.M!!
!.1M!! ".!!!! !.M!!!
!.M!! !.M!!! !.M!!!
BB LJ,$N E eig(:)
J E
>!."7+" !.MM+ >!.*70*
!.M0+M >!.+777 >!.,07!
>!.10!0 >!.M+*" >!.17
$ E
!."+M0 ! !
! !.*+" !
! ! .M!*!

Another useful linear algebra function is meshgrid which has the following synta-:

LC,@N E meshgrid(-,y)
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ 1!
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
This function transforms the domain specified by .ectors - and y into arrays C and @ that can be
used for the e.aluation of functions of two .ariables and the construction of 7>$ surface plots.
The rows of the output array C are copies of the .ector - and the columns of the output array @
are copies of the .ector y. 2or e-ample:
BB -EL! " 7NK
BB yEL! " 7NK
BB LC,@NEmeshgrid(-,y)
C E
! " 7
! " 7
! " 7
! " 7
@ E
! ! ! !
" " " "

7 7 7 7
Taking the corresponding elements in the first rows of C and @ as pairs, defines the coordinates
of points along the C>a-is with C .alues of !, ", , and 7 respecti.ely. The second rows define
coordinates with the same C .alues along the line @ E ", and so forth.
4.% &lotting in MATLAB
MATLAB has many built in plotting routines that pro.ide outstanding .isuali/ations of data.
2or e-ample, the cosine function can be plotted as follows:

BB - E L!:pi<7+:GpiNK
BB y E cos(-)K
BB plot(-G"*!<pi,y)
BB -label(Q-(degree)Q), ylabel(Qcos(-)Q)
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ 11
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
0 50 100 150 200 250 300 350 400
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
x(degree)
c
o
s
(
x
)
The plot appears in a separate window called 2igure ". There are many ways to manipulate the
plot to achie.e a desired formatting.
Three dimensional graphs are particularly useful and one can learn more about all the
functionality for this kind of plotting in MATLAB by typing:
BB help graph7d
&lotting commands used in the e-ercises for the te-tbook describe, for e-ample, stress Aelds or
displacement Aelds. The following e-ample illustrates how Aelds of data can be plotted as a
contour map:

BB . E L>:.:NK
BB LC,@,DN E peaks(.)K
BB contour(C,@,D,"!)
The peaks function is a function of two .ariables, obtained by translating and scaling ?aussian
distributions. It is useful for demonstrating MATLAB plotting routines. Type the lines of code
gi.en abo.e and produce the following contour map of the peaks function for the range of
parameter ..
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ 12
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
5e-t try typing the function surf(C,@,D) in the %ommand ;indow to produce the following 7$
.isuali/ation of the contour plot for the peaks function:
-2
-1
0
1
2
-2
-1
0
1
2
-8
-6
-4
-2
0
2
4
6
8
10
To see how MATLAB plots .ectors try the following:

BB L6,JN E gradient(D,!.)K
BB hold on
BB =ui.er(C,@,6,J)
2urther useful MATLAB graphical commands include:
figure opens a new Agure
clf clears a Agure
hold on<off holds a plot, which admits se.eral plotting commands in one Agure
colorbar adds a reference bar of colors used in a plot.
4.' Creating an !("ile
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ 1,
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
It can become cumbersome to write a number of lines of code in the %ommand ;indow. 'rrors
are not easily corrected and it is not easy to run the code multiple times with different choices of
parameters. The alternati.e is to create an m>file.
In the 2ile menu go to 5ew and select M>2ile. This opens a new window that is the 'ditor. In
this window you can write many lines of code and use the mouse to position the insertion point
as in a te-t editor. In the $ebug menu choose :a.e and 4un (or simply 4un) to e-ecute the lines
of code.
4.) Loading data
MATLAB enables loading of many different types of data. A couple of the more useful methods
that are used in the e-ercises are mentioned here.
Most data in the e-ercises will come in A:%II te-t Ales in which .alues are arranged in rows and
columns as an array. MATLAB easily recogni/es those, but is sensiti.e to missing entries which
should be replaced with nan. Te-t Ales are loaded using:

BB $ATA E load(Pdata.t-tP)K
The .ariable $ATA will be an array containing all rows and columns of data.t-t.
Another Ale type that is easily loaded and may be used in the e-ercises is an 'C%'L Ale.
MATLAB loads these using:

BB data E -lsread(Pdata.-lsP)K
!utting it a"" together
All the calculations so far were done in the command window, but when you sol.e more
complicated problems, you may get tired of retyping e.erything into the command window.
There are two ways MATLAB allows you to write your own routines (programs).
:cripts operate on the data in the workspace. They do not accept input arguments or return output
arguments. Input is taken from the workspace and output is written to the workspace. Ad.antages
are a slightly easier synta- and access to all data in the workspace. The disad.antage is that the
workspace might get cluttered with .ariables. Many scripts are pro.ided on the te-tbook website
that reproduce graphical figures from the te-tbook and sol.e e-ercise problems.
2unctions accept input arguments and return output arguments. All .ariables deAned or
calculated within the function remain local to the function and are not sa.ed to the workspace.
The main ad.antage is that workspace does not get cluttered. The synta- is a little more
complicated than that for scripts.
# Exercise using an exa$%"e scri%t
Below is an e-ample script that can be used to reproduce 2igure "."M in the te-t, a contour map
of the normal stress component acting parallel to a model fault. The Matlab .ersion you will
create is in color, whereas the te-t .ersion is gray scale. The ranges for both x and y are from
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ 1"
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
>.Ma to F.Ma where a is the half length of the model fault. This is referred to as the RlocalP stress
field in the .icinity of the model fault. The sign con.entions associate a positi.e displacement
discontinuity across the model fault with left>lateral slip. Also, tensile stress is positi.e and
compressi.e stress is negati.e.
%opy an electronic .ersion of this script from the te-tbook website under %hapters >B %hapter "
>B %hapter :cripts, paste this into the MATLAB 'ditor, and run the script to confirm that is does
reproduce the figure. 4ead the script line by line and try to understand how the script is
organi/ed. 6se the help command to get detailed information about the MATLAB constants and
functions. 2ocus your attention on the script itself and not on the mechanical concepts related to
faulting or the deri.ation of the e=uations for the stress component. Those concepts and
deri.ations will be considered in a later chapter.
% fig_01_15
% constant shearing displacement discontinuity on 2D line element
% Crouch and Starfield (1990) chapter 5
% element centered at origin parallel to !"a!is from "a #$ ! #$ %a
% calculate Cartesian normal stress component in !&

clear all clf reset' % initiali(e memory and figure
d! $ 0&001' % displacement discontinuity tangential to element
mu $ )0000' pr $ 0&25' % elastic shear modulus and *oisson+s ratio
c $ 1,(-.pi.(1"pr))' % constant multiplier for stress components
a $ 1' % line element half length
rc $ 0&09.a' % radius of dislocation core at element tips
!$"2&5.a/&05.a%eps/2&5.a' % !"coords& of grid
y$"2&5.a/&05.a/2&5.a' % y"coords& of grid
0123 $ meshgrid(!y)' % Cartesian grid
1452 $ (1"a)&62' 1*52 $ (1%a)&62' 22 $ 2&62' % common terms
% deri7ati7es of stress function
8C12 $ c.((2&,(1452%22))"(2&,(1*52%22)))'
8C122 $ c.(((1452"22)&,(1452%22)&62)"((1*52"22)&,(1*52%22)&62))'
S11 $ 2.mu.d!.(2.8C12 % 2&.8C122)' % Cartesian stress component
% eliminate 7alues 9ithin dislocation core at tips of element
:1 $ s;rt((1"a)&62%2&62)' :2 $ s;rt((1%a)&62%2&62)'
S11(find(:1#(rc))) $ nan' S11(find(:2#(rc))) $ nan'
contourf(12S1125)% plot contour map of stress component s!!
title(+stress s!!+) !la<el(+!+) yla<el(+y+) color<ar
") 4un the script and print the contour map of the local stress field. $escribe the stress
distribution, paying particular attention to the symmetry and the 8u-taposition of stress with
opposite sign across the model fault.
) $escribe what is accomplished in each of the following lines of script:
clear all clf reset'
!$"2&5.a/&05.a%eps/2&5.a'
0123 $ meshgrid(!y)'
:1 $ s;rt((1"a)&62%2&62)' S11(find(:1#(rc))) $ nan'
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ 1+
Fundamentals of Structural Geology
Exercise: introduction to MATLAB
contourf(12S1125)title(+stress s!!+) !la<el(+!+) yla<el(+y+) color<ar
7) ;rite an alternati.e piece of code to accomplish the same thing as the following line.
y$"2&5.a/&05.a/2&5.a'
,) 4un the script to e.aluate and plot the normal stress distribution in the region immediately
around the right>hand model fault tip (this is the so>called Rnear>tipP field). 2or e-ample, compute
out to distances that are only twice the radius of the dislocation core, rc. &rint this contour map.
$escribe the stress distribution, contrasting this with the RlocalP stress distribution. #ow are they
similarO #ow are they differentO
M) 4un the script to e.aluate and plot the normal stress distribution in the region that includes
points far from the model fault relati.e to its half length (the so>called RremoteP field). 2or
e-ample compute out to distances of Ma. &rint this contour map. $escribe the stress distribution,
contrasting this with the RlocalP and Rnear>tipP stress distributions. #ow are they similarO #ow are
they differentO
+) &lot the colored parametric surface in 7$ for the local stress distribution. 6se this plot to
illustrate and describe where this component of stress appears to be discontinuous.
1) ;hat geologic structures might be associated with the stress concentrations that ha.e different
signs on either side of the model faultO
& 'u$$ary
This has been a .ery cursory introduction to a few of the myriad functions and operations of
MATLAB. It is meant to simply whet your appetite for using this wonderful tool. This would be a
good time to get a book with tutorial co.erage of all the basic functions and operations and
continue your learning e-perience.
;e ha.e found that MATLAB is an in.aluable tool for structural geologists. The approach we
ad.ocate in the te-tbook is to adopt this tool and use m>scripts to analy/e structural data and
build models of tectonic processes. It is our opinion that becoming an accomplished user of
MATLAB puts students in a better position to succeed in this profession than learning to use many
special purpose programs for indi.idual tasks such as construction of a stereographic pro8ection
or sol.ing a particular boundary .alue problem.
July 12 2!1" # $a%id $& 'ollard and (aymond )& Fletc*er 2!!+ 1-

You might also like