Engineering With Mathcad Using Mathcad to Create and Organize Your Engineering Calculations Engineering With Mathcad Using Mathcad to Create and Organize Your Engineering Calculations Brent Maxfield AMSTERDAM • BOSTON • HEIDELBERG • LONDON • NEWYORK • OXFORD PARIS • SANDIEGO • SANFRANCISCO • SINGAPORE • SYDNEY • TOKYO Butterworth-HeinemannisanimprintofElsevier Butterworth-HeinemannisanimprintofElsevier LinacreHouse,JordanHill,OxfordOX28DP 30CorporateDrive,Suite400,Burlington,MA01803 Firstpublished2006 Copyright©2006,BrentMaxfield.Allrightsreserved TherightofBrentMaxfieldtobeidentifiedastheauthorofthisworkhasbeen assertedinaccordancewiththeCopyright,DesignsandPatentsAct1988 TheCDinthebackofthisbookincludesanEvaluationVersionofMathcad©13 SingleUserEdition,whichisreproducedbypermission.Thissoftwareisa fully-functionaltrialofMathcadwhichwillexpire120daysfrominstallation. Fortechnicalsupport,moreinformationaboutpurchasingMathcad,orupgrading frompreviouseditions,seehttp://www.mathcad.com. MathcadandMathsoftareregisteredtrademarksofMathsoftEngineeringand Education,Inc.,http://www.mathsoft.com.MathsoftEngineering&Education,Inc. ownsboththeMathcadsoftwareprogramanditsdocumentation.Boththeprogram anddocumentationarecopyrightedwithallrightsreservedbyMathsoft.Nopart oftheprogramoritsdocumentationmaybeproduced,transmitted,transcribed, storedinaretrievalsystem,ortranslatedintoanylanguageinanyformwithout thewrittenpermissionofMathsoft. Nopartofthispublicationmaybereproducedinanymaterialform(including photocopyingorstoringinanymediumbyelectronicmeansandwhether ornottransientlyorincidentallytosomeotheruseofthispublication)without thewrittenpermissionofthecopyrightholderexceptinaccordancewiththe provisionsoftheCopyright,DesignsandPatentsAct1988orunderthetermsof alicenceissuedbytheCopyrightLicensingAgencyLtd,90TottenhamCourtRoad, London,EnglandW1T4LP.Applicationsforthecopyrightholder’swrittenpermission toreproduceanypartofthispublicationshouldbeaddressedtothepublisher PermissionsmaybesoughtdirectlyfromElsevier’sScienceandTechnologyRights DepartmentinOxford,UK:phone:(+44)(0)1865843830;fax:(+44)(0)1865853333; e-mail:permissions@elsevier.co.uk.Youmayalsocompleteyourrequeston-linevia theElsevierhomepage(http://www.elsevier.com),byselecting‘CustomerSupport’ andthen‘ObtainingPermissions’ BritishLibraryCataloguinginPublicationData AcataloguerecordforthisbookisavailablefromtheBritishLibrary LibraryofCongressCataloguinginPublicationData AcataloguerecordforthisbookisavailablefromtheLibraryofCongress ISBN-13:978-0-7506-6702-9 ISBN-10:0-7506-6702-8 ForinformationonallButterworth-Heinemannpublications visitourwebsiteathttp://books.elsevier.com PrintedandboundinGreatBritain 06 07 08 09 10 10 9 8 7 6 5 4 3 2 1 Acknowledgment GratefulacknowledgmentisgiventoMathsoftEngineeringandEducation,Inc. forpermissiontouseinformationfromtheMathcadUsersGuide,MathcadHelp, MathcadAdvisorNewsletters,andtheMathsoftTechnicalSupportwebpage. v Contents Acknowledgment v Preface xix Introduction xxi Part I Building your Mathcad Toolbox 1 1 Variables 3 Variables 3 Typesofvariables 3 Definingvariables 4 Rulesfornamingvariables 4 Caseandfont 4 Charactersthatcanbeusedinvariablenames 4 Subscripts 5 Specialtextmode 6 Chemistrynotation 7 Stringvariables 8 Whyusevariables 8 Guidelinesfornamingvariables 10 Summary 13 Practice 13 2 CreatingandeditingMathcadexpressions 15 Introduction 16 Regions 16 Definitionofregion 16 Usingtheworksheetruler 16 Tabs 17 vii viii Contents Selectingandmovingregions 17 Aligningregionsandalignmentguidelines 17 Mathregions 20 Textregions 20 Creatingtextregions 20 Changingfontcharacteristics 20 InsertingGreeksymbols 21 Endingatextregion 21 Controllingthewidthofatextregion 21 Movingregionsbelowthetextregion 21 Paragraphproperties 22 Textruler 24 Spellcheck 25 Creatingsimplemathexpressions 25 Creatingmorecomplexexpressions 26 Editingexpressions 29 Selectingcharacters 29 Deletingcharacters 30 Deletingandreplacingoperators 30 Wrappingequations 30 Findandreplace 31 Find 31 Replace 33 Insertinganddeletinglines 34 Summary 35 Practice 35 3 Simplefunctions 37 Built-infunctions 38 User-definedfunctions 41 Whyuseuser-definedfunctions? 42 Usingmultiplearguments 43 Variablesinuser-definedfunctions 43 Examplesofuser-definedfunctions 46 Warnings 47 Summary 49 Practice 50 4 Units! 51 Introduction 51 Definitions 52 Changingthedefaultunitsystem 53 Assigningunitstonumbers 54 Contents ix Displayingderivedunits 59 Customdefaultunitsystem 61 Unitsofforceandunitsofmass 62 Creatingcustomunits 63 Unitsinequations 65 Donotredefinebuilt-inunits 65 Unitsinuser-definedfunctions 67 Unitsinempiricalformulas 68 SIUnitsOf() 71 Customscalingunits 73 Fahrenheitandcelsius 73 Changeintemperature 74 Degreesminutesseconds(DMS) 77 Hoursminutesseconds(hhmmss) 78 Feetinchfraction(FIF) 78 Creatingyourowncustomscalingfunction 79 Dimensionlessunits 80 Limitationofunits 81 Summary 82 Practice 83 5 Mathcadsettings 85 Preferencesdialogbox 86 Generaltab 86 FileLocationstab 87 HTMLOptionstab 89 Warningstab 91 Scriptsecuritytab 93 Language 95 Savetab 95 SummaryofthePreferencetab 96 WorksheetOptionsdialogbox 96 Built-invariablestab 96 Calculationtab 98 Displaytab 100 Unitsystemtab 101 Dimensionstab 101 Compatibilitytab 101 ResultFormatdialogbox 102 NumberFormattab 102 DisplayOptionstab 105 UnitDisplaytab 106
Description: