CHEM%20140L%20-%20Mathcad%20Tutorial

CHEM%20140L%20-%20Mathcad%20Tutorial - T2-1Tutorial 2A...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: T2-1Tutorial 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 TutorialT2-2Creating 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 TutorialT2-3=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 x-values 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 TutorialT2-4For 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.

Page1 / 16

CHEM%20140L%20-%20Mathcad%20Tutorial - T2-1Tutorial 2A...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online