ELECTRONIC SPREADSHEATS ELECTRONIC SPREADSHEATS Chapter 14 Dr. Bahaa Al-Sheikh & Eng. Mohammed...

Post on 14-Dec-2015

216 views 0 download

Transcript of ELECTRONIC SPREADSHEATS ELECTRONIC SPREADSHEATS Chapter 14 Dr. Bahaa Al-Sheikh & Eng. Mohammed...

ELECTRONIC SPREADSHEATS Chapter 14

Dr. Bahaa Al-Sheikh & Eng. Mohammed AlSumady

Intoduction to Engineering

BME152

ELECTRONIC SPREADSHEETS

An electronic spreadsheet is a tool that can be used to solve an engineering problem. Spreadsheets are commonly used to record, organize, and analyze data using formulas.

Spreadsheets are also used to present the results of an analysis in chart form. Although engineers still write computer programs to solve complex engineering problems, simpler problems can be solved with the help of a spreadsheet.

14-3

Microsoft Excel – Basic Ideas

Title barFormula bar Toolbar

button

Column header

Menu bar

Name box

Row header

Active cell

Worksheet tabs

Status bar

© 2011 Cengage Learning Engineering. All Rights Reserved.

Cells and Their Addresses

The columns are marked by A, B, C, D, and so on, while the rows are identified by numbers 1, 2, 3, 4, and so on.

The cells that are selected simultaneously are called a Range, as shown in figure 14.2 .

A range is defined by the cell address of the top-left selected cell in the range followed by a colon, :, and ends with the address of the bottom-right cell in the range.

A Range

14-6

Cell and Address

Cell – represents the box that one sees as the result of the intersection of a row and a column

Cell C4

What you type in formula barWhat you get in active cell

© 2011 Cengage Learning Engineering. All Rights Reserved.

Creating Formulas in Excel

You can use Excel to input engineering formulas and compute the results. In Excel, a formula always begins with an equal sign, =

Example 14.1

The following example will show how the density of standard air changes with temperature. The density of standard air is a function of temperature and may be approximated using the ideal gas law according to where :

Using Excel, we want to create a table that shows the density of air as a function of temperature in the range of 0C (273.15 K) to 50C (323.15 K) in increments of 5C.

Example 14.1

1. In cell A1, type Density of air as a function of temperature.

2. In cells A3 and B3, type Temperature (C),Density (kg/m^3), respectively.

3. In cells A5 and A6, type 0 and 5,respectively.

Example 14.1

4. Pick cells A5 and A6 and use the fill command with the + handle to copy the pattern into cells A7 to A15.

Example 14.1

5. In cell B5, type the formula (101300)/ ((286.9)*(A5 273)), as shown.

Example 14.1

6. Use the Home menu (tab) and the Fill command to copy the formula into cells B6 to B15. You could also use the fill command with the handle to copy the formula into cells B6 to B15.

Example 14.1

7. Pick cells B5: B15 and right-click and Pick Format Cells. Change the number of decimal places to 2, as shown.

The final results for Example 14.1

Using Excel Functions

You can enter a function in any cell by simply typing the name of the function if you already know it.

If you do not know the name of the function, then you can press the Insert Function ( fx) button, and then from the menu select the Function category and the Function name.

Some examples of commonly used Excel functions, along with their proper use and descriptions, are shown in Table 14.3.

Using Excel Functions

Using Excel Functions

14-18

Example 14.3 – Excel Functions (continued)

E1: =SUM(A1:B10)E2: =AVERAGE(A1:B10)E3: =COUNT(A1:B10)E4: =MAX(A1:B10)E5: =MIN(A1:B10)E6: =STDEV(A1:B10)E7: =PI()E8: =DEGREES(PI())E9: =RADIANS(90)E10: =RADIANS(D1)E11: =COS(PI()/2)E12: =COS(RADIANS(D1))E13: =SIN(PI()/2)E14: =SIN(RADIANS(D1))

© 2011 Cengage Learning Engineering. All Rights Reserved.

Example 14.4

Using Excel, compute the average (arithmetic mean) and the standard deviation of the density of water data given in Table 14.5

Example 14.4

Practice example 14.4 at home theoretically and on the PC . If you have questions ask in the next class.

More examples of additional functions

Using Excel Logical Functions

Using Excel Logical Functions

Example 14.5

The pipeline shown in the Figure connected to a control (check) valve that opens when the pressure in the line reaches 20 psi. Various readings were taken at different times and recorded. Using Excel’s logical functions, create a list that shows the corresponding open and closed position of the check valve

Example 14.5

Practice example 14.g at home. Any questions ask in the next class.

14-26

Plotting with Excel

Use Excel to create charts such as Histograms (column or bar charts) Pie charts Line charts XY charts

Most charts we create as engineers are xy-type charts

Chart Wizard walk you through the necessary steps to create a chart

© 2011 Cengage Learning Engineering. All Rights Reserved.

Example 14.6 – Plotting

Given: the results from Example 14.1Find: create a graph showing the value of air density as a function of temperature.

14-27

© 2011 Cengage Learning Engineering. All Rights Reserved.

14-28

Example 14.6 – Plotting (continued)

Solution:

Select the data range

Select Chart Wizard icon

Click Scatter plot

Click Insert tab

Select XY plot with line

© 2011 Cengage Learning Engineering. All Rights Reserved.

14-29

Example 14.6 – Plotting (continued)

Solution (continued): the chart is shown to the right of the data

© 2011 Cengage Learning Engineering. All Rights Reserved.

14-30

Example 14.6 – Plotting (continued)

Chart Title and Axis Title icons

Layout tab

Solution (continued): add axis and chart titles by clicking the Layout tab under Chart Tool menu and make necessary modifications

© 2011 Cengage Learning Engineering. All Rights Reserved.

Matrix Computation with Excel

During your engineering education, you will learn about different types of physical variables.

These types of physical variables, which are identifiable by a single value, are called scalars.

The physical variables that possess both magnitude and direction are called vectors.

Matrix Computation with Excel

There are also other quantities that in order to describe them accurately we need to specify more than two pieces of information.

For example, if you were to describe the location (with respect to the entrance of a garage) of a car parked in a multi-story garage, you need to specify the floor (the z coordinate) and then the location of the car on that floor, specifying the section and the row (x and y coordinates).

Matrix Computation with Excel

A matrix is an array of numbers, variables, or mathematical terms.

A matrix may consists of m rows and n columns. For example,