Data analysis in geophysics - ceri.memphis.edu

Data analysis in geophysics - ceri.memphis.edu

CERI-7104/CIVL-8126 Data Analysis in Geophysics Continue Introduction to Matlab Graphics Handles Lab: practice with interactive input, reading file, and plotting. Lab 9, 09/24/19 More on Graphics Handles How to improve the graphics. See how2handlegraphics.m >> get(0) CallbackObject: Children: CurrentFigure: FixedWidthFontName: HandleVisibility: MonitorPositions: Parent: PointerLocation:

ScreenDepth: ScreenPixelsPerInch: ScreenSize: ShowHiddenHandles: Tag: Type: Units: UserData: >> get(0,'default') ans = struct with fields: [00 GraphicsPlaceholder] [11 Figure] [11 Figure] 'Courier New' 'on' [1 1 1440 900] [00 GraphicsPlaceholder] [219 68] 32 72

[1 1 1440 900] 'off' '' 'root' 'pixels' [] defaultFigurePosition: defaultFigurePaperPositionMode: defaultAxesColorOrder: defaultAxesLineStyleOrder: defaultAxesFontSize: defaultTextFontSize: defaultLineLineWidth: >> [440 378 560 420] 'auto' [0 0 0] [52 char] 18 16

3 >> a=gcf a = Figure (1: basic histogram plot) with properties: Number: 1 Name: 'basic histogram plot' Color: [0.940000000000000 0.940000000000000 0.940000000000000] Position: [440 378 560 420] Units: 'pixels' Show all properties >> gcf gets current figure handle. Next slide shows what happens when you click on show all properties Show all properties Alphamap: BeingDeleted:

BusyAction: ButtonDownFcn: Children: Clipping: CloseRequestFcn: Color: Colormap: CreateFcn: CurrentAxes: CurrentCharacter: CurrentObject: CurrentPoint: DeleteFcn: DockControls: FileName: GraphicsSmoothing: HandleVisibility: InnerPosition: IntegerHandle: Interruptible: InvertHardcopy: KeyPressFcn:

KeyReleaseFcn: MenuBar: Name: NextPlot: Number: NumberTitle: OuterPosition: PaperOrientation: PaperPosition: PaperPositionMode: PaperSize: PaperType: PaperUnits: Parent: Pointer: PointerShapeCData: PointerShapeHotSpot: Position: Renderer: RendererMode: Resize: Scrollable:

SelectionType: SizeChangedFcn: Tag: ToolBar: Type: UIContextMenu: Units: UserData: Visible: WindowButtonDownFcn: WindowButtonMotionFcn: WindowButtonUpFcn: WindowKeyPressFcn: WindowKeyReleaseFcn: WindowScrollWheelFcn: WindowState: WindowStyle: XDisplay: [164 double] 'off' 'queue'

'' [11 Axes] 'on' 'closereq' [0.940000000000000 0.940000000000000 0.940000000000000] [643 double] '' [11 Axes] ')' [00 GraphicsPlaceholder] [0 0] '' 'on' '' 'on' 'on' [440 378 560 420] 'on' 'on' 'on' '' ''

'figure' 'basic histogram plot' 'add' 1 'on' [440 378 560 493] 'portrait' [0.361111111111111 2.583333333333334 7.777777777777779 5.833333333333332] 'auto' [8.500000000000000 11] 'usletter' 'inches' [11 Root] 'arrow' [1616 double] [1 1] [440 378 560 420] 'opengl' 'auto' 'on' 'off' 'normal'

'' '' 'auto' 'figure' [00 GraphicsPlaceholder] 'pixels' [] 'on' '' '' '' '' '' '' 'normal' 'normal' 'Quartz >> c=gca c = Axes (basic histogram plot) with properties: XLim:

YLim: XScale: YScale: GridLineStyle: Position: Units: [-3.300000000000000 3.300000000000000] [0 400] 'linear' 'linear' '-' [0.130000000000000 0.123333333333333 0.775000000000000 0.801666666666667] 'normalized' Show all properties >> Next slide shows what happens when you click on show all properties (there are 138 things in the list!!)

Show all properties ALim: ALimMode: ActivePositionProperty: AlphaScale: Alphamap: AmbientLightColor: BeingDeleted: Box: BoxStyle: BusyAction: ButtonDownFcn: CLim: CLimMode: CameraPosition: CameraPositionMode: CameraTarget: CameraTargetMode: CameraUpVector: CameraUpVectorMode: CameraViewAngle: CameraViewAngleMode:

Children: Clipping: ClippingStyle: Color: ColorOrder: ColorOrderIndex: ColorScale: Colormap: CreateFcn: CurrentPoint: DataAspectRatio: DataAspectRatioMode: DeleteFcn: FontAngle: FontName: FontSize: FontSizeMode: FontSmoothing: FontUnits: FontWeight: GridAlpha: GridAlphaMode:

GridColor: GridColorMode: GridLineStyle: HandleVisibility: HitTest: Interactions: Interruptible: LabelFontSizeMultiplier: Layer: Legend: LineStyleOrder: LineStyleOrderIndex: [0 1] 'auto' 'outerposition' 'linear' [164 double] [1 1 1] 'off' 'on' 'back'

'queue' '' [0 1] 'auto' [0 200 17.320508075688771] 'auto' [0 200 0] 'auto' [0 1 0] 'auto' 6.608610360311924 'auto' [11 Histogram] 'on' '3dbox' [1 1 1] [0 0 0] 1 'linear' [643 double] '' [23 double]

[3.300000000000000 200 1] 'auto' '' 'normal' 'Helvetica' 18 'auto' 'on' 'points' 'normal' 0.150000000000000 'auto' [0.150000000000000 0.150000000000000 0.150000000000000] 'auto' '-' 'on' 'on' [11 matlab.graphics.interaction.interface.DefaultAxesInteractionSet] 'on' 1.100000000000000 'bottom' [00 GraphicsPlaceholder]

[52 char] 1 This web page has the documentation for all the graphics object properties https://www.mathworks.com/help/matla b/graphics-object-properties.html Go there to see how it is organized. Another example of tex and the gibberish you have to type/understand to make pretty output (TEK is a typesetting program and makes the prettiest outputs but at a cost! You can guess how it works reading it and looking at the output, but it is hard to come up with it.) \[ \int_a^bu\frac{d^2v}{dx^2}\,dx =\left.u\frac{dv}{dx}\right|_a^b -\int_a^b\frac{du}{dx}\frac{dv}{dx}\,dx. \]

And another Typesetting continued fractions is easy: \[ x = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \frac{1}{a_3 + a_4}}} \] This is pretty much the antithesis of the WYSIWYG (an acronym for What You See Is What You Get) philosophy of MS Word, Pages (Apples version of Word). etc. How turn off underscore signifying next character is a subscript (default intrepreter is TEX). This way you dont have to escape the underscore (\_) to get it to be an underscore. This is needed when the text is not hard coded, eg. a file name. Set the Interpreter property for that field to 'none'; the default for text() fields is TEX.

Write script to read the files mixedin1.dat and mixedin2.dat These files have earthquake data. Most earthquake data files have a mixture of numbers and text (the first file) and time formatted data, and a header (that typically identifies the data columns (the second file). Prompt for file name Empty response? File exists? Read file into inbuf Display line Prompt for positions in input line of x and y data to plot Get number lines Preallocate memory (for speed, need to know how many lines in input file) Loop over lines to pull (x,y) data out of input cell array Plot x,y data Another way to read data a line at a time fgets and fgetl.

First one keeps newline character, second one drops the newline character see red stuff below >> tline = fgets(fid) tline = '2014 04 26 -55.8259 -27.1533 34.93 4.6 2014-04-26T02:02:20.930Z near s georgia tline = fgetl(fid) tline = '2014 04 01 -60.1681 -24.8498 10 4.9 2014-04-01T08:29:13.300 near s georgia As you read the file a line at at time it advances through the file. If need to go back to the beginning you have to rewind. You can also give handles to functions, this allows you to pass functions as arguments to other functions f = @(x) x.^3 -3*x+1;

Then call f(3.4) etc., (like sin, cosine, etc.) This also makes function handles so you can pass functions to other functions X=linspace(0,2); Plot(x,f(x))

Recently Viewed Presentations

  • Title Slide Master

    Title Slide Master

    Associate Director, LH Martin Institute "Put a stake in the ground": to take the first step; to make a big move to get something started. Stop the rorts: $30 million crackdown looms for vocational sector's dodgy training providers.
  • Benefits Administration Training

    Benefits Administration Training

    The value in Elg Fld 2 drives what ICI options are available for enrollment. If Elg Fld 2 is blank, an option to enroll in ICI will NEVER open. Hire from Affiliate (HFA) - if hired from another payroll center,...
  • Pressing On Text: : Philippians 3:12-16 Series: Uncommon

    Pressing On Text: : Philippians 3:12-16 Series: Uncommon

    Philippians 3. 9 and may be found in Him, not having a righteousness of my own . derived from the Law, but that which is through faith in Christ, ... (ESV) Philippians 3. 13 Brothers, I do not consider that...
  • IRAN - Alvin Independent School District

    IRAN - Alvin Independent School District

    Iran and the U.S. do not have friendly relations. One reason is that Iran has called for the . destruction of the state of Israel. The president of Iran has been defiantly anti-Western and venomously anti-Israeli, announcing that Israel was...
  • Cifrado Asimétrico Exponencial - Weebly

    Cifrado Asimétrico Exponencial - Weebly

    Si bien al generar claves RSA con librerías actuales como Crypto++ de Wei Dei (OpenSSL) aparecen claves que no pueden considerarse como óptimas ya que no se controla este hecho, hay que tener en mente que las claves privadas parejas...
  • Chapter 5 Steady-State Sinusoidal Analysis 1. Identify the

    Chapter 5 Steady-State Sinusoidal Analysis 1. Identify the

    We can apply KVL directly to phasors. The sum of the phasor voltages equals zero for any closed path. The sum of the phasor currents entering a node must equal the sum of the phasor currents leaving. 1. Replace the...
  • Industry Day Brief Template November 2017 DHA Industry ...

    Industry Day Brief Template November 2017 DHA Industry ...

    Acquisition Decision Brief planned for 2QTRFY19 . Contract opportunities in FY21 - FY25. Learning Strategy, Tactics and Technology (LSTT) ... Industry Day Brief Template November 2017 DHA Industry Exchange November 30, 2017 Last modified by:
  • Presentation title - Tapestry Capital

    Presentation title - Tapestry Capital

    Social Enterprise Platform. OCF advocated for the Social Enterprise platform at the Innovation Centre at Bayview Yards. Social Enterprise incubator is a one-stop shop with business case development and other professional services