290 likes | 429 Views
PH15010. Laboratory Techniques - An Introduction to MATHCAD. Introduction. Review of Last Week Modelling Projectile Motion. Review of Last Week. Assessed Exercise Sheet Layout Spelling Units Inverse Trig functions Defining Your Own Functions. Sheet Layout. Change sheet to A4 format
E N D
PH15010 Laboratory Techniques - An Introduction to MATHCAD
Introduction • Review of Last Week • Modelling Projectile Motion
Review of Last Week • Assessed Exercise • Sheet Layout • Spelling • Units • Inverse Trig functions • Defining Your Own Functions
Sheet Layout • Change sheet to A4 format • File|Page Setup…|Paper Size|A4 • Put your initials/email in page header • Format|Header/Footers… • Use Page Breaks • Insert|Page Break
More Layout & Spelling • Watch the right hand margin • Can force print in single column • File|Page Setup…|Print Single Page Width
Aligning Regions • Align Regions • Select with mouse • Format|Align Regions|… • Or select button from toolbar
Separating Regions • Overlapping Regions • Looks bad • Makes debugging difficult • Format|Separate Regions
Spelling Check • Check spelling in worksheet • Edit|Check Spelling…
Units • Don’t do your own conversions on answers • Use mathCADs facilities
Inverse Trig Functions • Sometimes written as sin-1(x) • Use asin(x), acos(x), atan(x) etc • Pronounced arcsin, arccos, arctan…
User Defined Functions in MathCAD • Define Once • Use many times
User Defined Functions in MathCAD #2 • Bad Example: • Not using function • No point in using function
User Defined Functions in MathCAD #3 • Good Example: • Function Defined ONCE • Used several times
Example Worksheet - Projectile Motion • Projectile Motion • Cannon Ball • Neglect Air Resistance • Use standard equations of motion • Supplied parameters • vMuzzle, a, g • Copy worksheet from:http://users.aber.ac.uk/dpl/ph15010/handouts/cannonball.mcd
Projectile Motion #3 • Use simple trig to get x- and y- components of velocity
Projectile Motion #4 • Function to model x-axis motion • pX(t) • position of X w.r.t. time
Projectile Motion #5 • Function to model y-axis motion • pY(t) • Uses s=ut+1/2at2 • Watch sign of acceleration
Projectile Motion #7 • Want to: • Determine time of impact • Plot parabola of pY vs pX
Projectile Motion #8 • Determine time of impact • Zoom in on graph & estimate • Use Solve Block
Projectile Motion #9The solve block • MathCAD can solve systems of equations • Structure • <Guess Values> • given • <System of equations> • 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 basic • Variable takes on a range of values • Can then plot pY(t) vs pX(t)