This preview shows pages 1–5. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: T21Tutorial 2A Mathcad TutorialIn this exercise, you will create a worksheet that calculates simple algebraic functions(such as x2, x3, and x2+ x3). Entering DataWith Mathcad, there are many ways in which we can enter data. In this exercise, wewish to enter values of xfrom 1 to 10. The simplest way to do this is as follows.You type:x : 1 , 2 ; 10You see:Each of the items above correspond to the following:Step 1:xVariable name.Step 2:: (colon)Keyboard shortcut for the assignment operator(:=). Theassignment operator is used to define new variables.Step 3:1Starting value of a data series.Step 4:, (comma)Used to separate items in the data series.Step 5:2Second item in data series. The second item also definesthe increment between data points if a range is defined.Step 6:; (semicolon)Keyboard shortcut for the range operator(..).Step 7:10Final value of a the data series.To see the values of the data series, type x =. Mathcad displays the data in the series.CHEM 140LTutorial 2  A Mathcad TutorialT22Creating a FormulaNow, create formulas to calculate x2, x3and x2+ x3respectively. Mathcad can do thecalculations for you, but first you need to instruct Mathcad how to perform thesecalculations. We will define each formula you in terms of the mathematical functionsa(x), b(x), and c(x). Do this The formula bar showsDo this:Mathcad displays this:1.Click on the worksheet.Click anywhere on the Mathcad worksheet belowthe definition of x.2.Type:a(x) : x ^ 23.Type:b(x) : x ^ 34.Type:c(x) : a(x) + b(x)To display the results of a(x), b(x), and c(x), you would type a(x) =, b(x) =, and c(x) =,respectively. Your Mathcad work should resemble the following worksheet.CHEM 140LTutorial 2  A Mathcad TutorialT23=Alternative MethodAnother way to approach this example, would be to define an array of elements. To start this example, we must redefine the array origin. By default, Mathcad refers tothe first element in an array as element zero. In this example, we want to set the arrayorigin to 1. By doing this, we can assign the xvalues to the array indexes X1through toX10. To change the array origin use the ORIGINvariable. To redefine the array origin:You type:ORIGIN : 1You see:Now we can define a range variable, that takes on a range of values. The range of valuesfor a range variable is defined by entering the semicolon (;). To define a range variable:You type:i : 1 ; 10You see:CHEM 140LTutorial 2  A Mathcad TutorialT24For this simple example, we will define the array...
View
Full
Document
This note was uploaded on 04/11/2010 for the course CHEM 1101 taught by Professor Leroy during the Spring '10 term at University of Toronto Toronto.
 Spring '10
 Leroy

Click to edit the document details