# PH15010 Laboratory Techniques - An Introduction to MATHCAD.

## Presentation on theme: "PH15010 Laboratory Techniques - An Introduction to MATHCAD."— Presentation transcript:

PH15010 Laboratory Techniques - An Introduction to MATHCAD

Introduction Review of Last WeekReview of Last Week Modelling Projectile MotionModelling Projectile Motion

Review of Last Week Assessed ExerciseAssessed Exercise –Sheet Layout –Spelling –Units –Inverse Trig functions –Defining Your Own Functions

Sheet Layout Change sheet to A4 formatChange sheet to A4 format – –File|Page Setup…|Paper Size|A4 Put your initials/email in page headerPut your initials/email in page header – –Format|Header/Footers… Use Page BreaksUse Page Breaks – –Insert|Page Break

More Layout & Spelling Watch the right hand marginWatch the right hand margin Can force print in single columnCan force print in single column – –File|Page Setup…|Print Single Page Width

Aligning Regions Align RegionsAlign Regions –Select with mouse –Format|Align Regions|… –Or select button from toolbar

Aligning Regions – Before and After

Separating Regions Overlapping RegionsOverlapping Regions –Looks bad –Makes debugging difficult Format|Separate Regions

Spelling Check Check spelling in worksheetCheck spelling in worksheet – –Edit|Check Spelling…

Inverse Trig Functions Sometimes written as sin -1 (x)Sometimes written as sin -1 (x) Use asin(x), acos(x), atan(x) etcUse asin(x), acos(x), atan(x) etc Pronounced arcsin, arccos, arctan…Pronounced arcsin, arccos, arctan…

User Defined Functions in MathCAD Define OnceDefine Once Use many timesUse many times

User Defined Functions in MathCAD #2 Bad Example:Bad Example: Not using functionNot using function No point in using functionNo point in using function

User Defined Functions in MathCAD #3 Good Example:Good Example: Function Defined ONCEFunction Defined ONCE Used several timesUsed several times

Example Worksheet - Projectile Motion Projectile MotionProjectile Motion Cannon BallCannon Ball Neglect Air ResistanceNeglect Air Resistance Use standard equations of motionUse standard equations of motion Supplied parametersSupplied parameters –vMuzzle, , g Copy worksheet from: http://users.aber.ac.uk/dpl/ph15010/h andouts/cannonball.mcdCopy worksheet from: http://users.aber.ac.uk/dpl/ph15010/h andouts/cannonball.mcd http://users.aber.ac.uk/dpl/ph15010/h andouts/cannonball.mcd http://users.aber.ac.uk/dpl/ph15010/h andouts/cannonball.mcd

Projectile Motion #2

Projectile Motion #3 Use simple trig to get x- and y- components of velocityUse simple trig to get x- and y- components of velocity

Projectile Motion #4 Function to model x-axis motionFunction to model x-axis motion –pX(t) position of X w.r.t. timeposition of X w.r.t. time

Projectile Motion #5 Function to model y-axis motionFunction to model y-axis motion –pY(t) –Uses s=ut+1/2at 2 –Watch sign of acceleration

Projectile Motion #6 Graph of pX(t) & pY(t) vs t

Projectile Motion #7 Want to:Want to: –Determine time of impact –Plot parabola of pY vs pX

Projectile Motion #8 Determine time of impactDetermine time of impact –Zoom in on graph & estimate –Use Solve Block

Projectile Motion #9 The solve block MathCAD can solve systems of equationsMathCAD can solve systems of equations StructureStructure – – –given – – –Find(v)=

The Solve Block Guess Value ‘Given’ followed by system of equations Bold = sign Find(t) function

Range Variables Like for…next loop in basicLike for…next loop in basic Variable takes on a range of valuesVariable takes on a range of values Can then plot pY(t) vs pX(t)Can then plot pY(t) vs pX(t)

Projectile Motion pY vs pX