Download presentation
Presentation is loading. Please wait.
Published byLindsay Carter Modified over 9 years ago
1
ELECTRONIC SPREADSHEATS ELECTRONIC SPREADSHEATS Chapter 14 Dr. Bahaa Al-Sheikh & Eng. Mohammed AlSumady Intoduction to Engineering BME152
2
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.
3
14-3 Microsoft Excel – Basic Ideas Title bar Formula bar Toolbar button Column header Menu bar Name box Row header Active cell Worksheet tabs Status bar © 2011 Cengage Learning Engineering. All Rights Reserved.
4
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.
5
A Range
6
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 bar What you get in active cell © 2011 Cengage Learning Engineering. All Rights Reserved.
7
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, =
8
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.
9
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.
10
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.
11
Example 14.1 5. In cell B5, type the formula (101300)/ ((286.9)*(A5 273)), as shown.
12
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.
13
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.
14
The final results for Example 14.1
15
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.
16
Using Excel Functions
18
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.
19
The Now and Today Functions It is a good idea to indicate when the document was last modified. In one of the top cells, you may want to type “Last Modified:”, and in the adjacent cell, you can use the =now( ) or =today( ) function. The now( ) function will automatically update the date and the time the file was last used. the today( ) function, it will only update the date.
20
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
21
Example 14.4 Practice example 14.4 at home theoretically and on the PC. If you have questions ask in the next class.
22
More examples of additional functions
23
Using Excel Logical Functions
25
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
26
Example 14.5 Practice example 14.g at home. Any questions ask in the next class.
27
14- 27 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.
28
Example 14.6 – Plotting Given: the results from Example 14.1 Find: create a graph showing the value of air density as a function of temperature. 14- 28 © 2011 Cengage Learning Engineering. All Rights Reserved.
29
14- 29 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.
30
14- 30 Example 14.6 – Plotting (continued) Solution (continued): the chart is shown to the right of the data © 2011 Cengage Learning Engineering. All Rights Reserved.
31
14- 31 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.
32
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.
33
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).
34
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,
35
Matrix Algebra Example 14.8 :
36
Example 14.8 1. In the cells shown, type the appropriate characters and values. Use the Format Cells and Font option to create the boldface variables, as shown above.
37
Example 14.8 2. In cell A10, type [A] +[B] =, and using the left mouse button, pick cells B9 through D11, as shown in the figure
38
Example 14.8 3. Next, in the Formula bar, type =B3:D5 G3:I5 and, while holding down the Ctrl and the Shift keys, press the Enter key. Note that using the mouse, you could also pick the ranges of B3:D5 or G3:I5 instead of typing them. This sequence of operations will create the result shown. You follow a procedure similar to the one outlined in step 2 to perform [A] -[B], except in the Formula bar type =B3:D5-G3:I5.
39
Example 14.8 4. To carry out the matrix multiplication, first type [A][B] = in cell A18, as shown. Then pick cells B17 through D19.
40
Example 14.8 5. In the Formula bar, type =MMULT (B3:D5,G3:I5), and, while holding down the Ctrl and the Shift keys, press the Enter key. Similarly, you can perform the matrix operation [A]{C }. First you pick cells B21 through B23, in the Formula bar, type =MMULT(B3:D5, L3:L5), and, while holding down the Ctrl and the Shift keys, press the Enter key. This sequence of operations will create the result shown in the figure.
41
Curve Fitting with Excel Curve fitting deals with finding an equation that best fits a set of data The purpose of this section is to demonstrate how to use Excel to find an equation that best fits a set of data which you have plotted.
42
Example 14.10 Recall, the spring constant k is determined by calculating the slope of a force–deflection line (i.e., slope =change in force /change in deflection). Excel was used to plot the deflection– load results of the experiment using the XY (Scatter) without the data points connected, as shown in the Figure 14.13
43
Example 14.10 To add the trendline or the best fit, with the mouse pointer over a data point, click the right button and choose Add Trendline. Next, from the Format Trendline dialog box, under Trend/Regression type, select Linear, and toggle on the Set intercept = and the Display equation on chart, as shown in Figure 14.15.
44
Example 14.10 After you press close, you should see the equation y=0.5542x on the chart, as shown in Figure 14.16. We have edited the variables of the equation to reflect the experimental variables as shown in Figure 14.17.
45
Example 14.10
46
Example 14.11 Find the equation that best fits the following set of data points in Table 14.10. Do at home and if you have question,ask.
47
Summary You should know that a 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. You can input your own formulas or use the built-in functions provided by the spreadsheet. should also know how to edit the content of a cell. You should know how to select multiple cells and create a range.
48
Summary You should understand how to refer to a cell by its address. You should be familiar with Excel’s built-in functions. You should know how to create a proper engineering chart using Excel. You should know how to perform matrix operations with Excel. You should know how to perform curve fitting with Excel.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.