Download presentation

Presentation is loading. Please wait.

Published byAimee Salkin Modified over 3 years ago

2
PH15720 Laboratory Techniques - An Introduction to MATHCAD

3
Introduction The if() functionThe if() function Complex NumbersComplex Numbers Symbolic AlgebraSymbolic Algebra

4
The if() function if(condition,Tval,Fval)if(condition,Tval,Fval) condition evaluatedcondition evaluated –True ( 0) returns Tval –False (=0) returns Fval

5
Conditional Operators From evaluation paletteFrom evaluation palette –= (bold, logical equals) –= (bold, logical equals) –> greater than –< less than – greater than or equal to – less than or equal to

6
Boolean Algebra False = 0False = 0 True = 1 (or 0)True = 1 (or 0) Use multiplication for ANDUse multiplication for AND Use addition for ORUse addition for OR (x>5)(x 5)(x<8) –True if x>5 and x 5 and x<8 (x 16)(x 16) –True if x 16

7
Boolean algebra #2

8
Magnetic field due to long straight wire #1 Different equations inside and outside conductorDifferent equations inside and outside conductor Inside:Inside: Outside:Outside:

9
Magnetic Field due to long straight wire #2 Combine two equations using if() functionCombine two equations using if() function Outside Inside Combined with if()

10
Magnetic Field due to long straight wire #3

11
Complex Numbers in MathCAD Handled same as other numbersHandled same as other numbers Full range of complex mathsFull range of complex maths Put i (or j) directly after complex numberPut i (or j) directly after complex number Enter i as 1iEnter i as 1i Use |x| to get modulusUse |x| to get modulus Use arg() to get argumentUse arg() to get argument Avoid using i as variable when using complex numbersAvoid using i as variable when using complex numbers

12
Complex Numbers #1 Basic complex mathsBasic complex maths

13
Complex Numbers #2 Principle roots foundPrinciple roots found Need to get other roots by hand or by using polyroots()Need to get other roots by hand or by using polyroots()

14
Symbolic Algebra #1 Manipulate equations rather than numbersManipulate equations rather than numbers Symbolic PaletteSymbolic Palette –Evaluate –Evaluate –Simplify simplify –Simplify simplify –Expand expand, –Expand expand, –Substitute substitute, = –Substitute substitute, = –Solvesolve, –Solvesolve,

15
Symbolic Algebra #2 Not covered in depth hereNot covered in depth here Handout gives resource centre referencesHandout gives resource centre references Worth a lookWorth a look

16
The tin can problem #1 From example sheet - solve using mathCADFrom example sheet - solve using mathCAD A manufacturer of tin cans wishes to maximise the volume contained in a can, whilst minimising the amount of metal used to construct the can. Show that, for given amount of metal, the volume of a can is maximised when the radius is half the height.A manufacturer of tin cans wishes to maximise the volume contained in a can, whilst minimising the amount of metal used to construct the can. Show that, for given amount of metal, the volume of a can is maximised when the radius is half the height.

17
The tin can problem Overview of Solution Assume Area of tin constantAssume Area of tin constant Obtain expression for Volume in terms of Area and radiusObtain expression for Volume in terms of Area and radius Find dVol/drFind dVol/dr dVol/dr will be 0 at max volume so use this to find rdVol/dr will be 0 at max volume so use this to find r Substitute to find r in terms of hSubstitute to find r in terms of h

18
The tin can problem #2 Need to find when dVol/dr=0Need to find when dVol/dr=0 Write down expressions for Volume & AreaWrite down expressions for Volume & Area Use bold, logical equals signUse bold, logical equals sign

19
The tin can problem #3 Copy & Paste expression for Area & solve for hCopy & Paste expression for Area & solve for h

20
The tin can problem #4 Copy & paste expression for VolCopy & paste expression for Vol Substitute expression for hSubstitute expression for h

21
The tin can problem #5 Use symbolic differentiation to find dVol/drUse symbolic differentiation to find dVol/dr This will be 0 at maximumThis will be 0 at maximum

22
The tin can problem #6 Solve for dVol/dr = 0 to find rSolve for dVol/dr = 0 to find r 2 solutions, copy +ve2 solutions, copy +ve

23
The tin can problem #7 Have expression for r in terms of AreaHave expression for r in terms of Area Substitute expression for AreaSubstitute expression for Area Now have expression for r in terms of r and hNow have expression for r in terms of r and h

24
The tin can problem #8 Take expression for r in terms of r and hTake expression for r in terms of r and h Add r=Add r= Solve for r to get answerSolve for r to get answer

25
Summary Modelling a discontinuous universe with the if() functionModelling a discontinuous universe with the if() function Complex NumbersComplex Numbers Symbolic AlgebraSymbolic Algebra

26
Assessment Next WeekNext Week In classIn class Processing experimentalProcessing experimental DataData

27
Assessment Golden Rules Comment & ExplainComment & Explain Get paper size right (A4)Get paper size right (A4) Layout/Page breaksLayout/Page breaks Use MathCAD 8 formatUse MathCAD 8 format Name/UserID on Header/FooterName/UserID on Header/Footer Attempt everythingAttempt everything

Similar presentations

OK

Conditions in Java. First…Boolean Operators A boolean data type is always true or false. Boolean operators always return true or false For example: (x.

Conditions in Java. First…Boolean Operators A boolean data type is always true or false. Boolean operators always return true or false For example: (x.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on seven segment display decoder Ppt on eddy current resistance Download ppt on heritage of india Ppt on clinical data management Ppt on data collection methods in action Ppt on condition based maintenance cbm Ppt on id ego superego theory Ppt on self awareness questions Ppt on cross site scripting vulnerability Ppt on different occupations for teachers