ppt - San Jose State University

Download Report

Transcript ppt - San Jose State University

Engineering
College of
Engr.10
San Jose State University
JKA & KY
1
Engineering
College of
San Jose State University
Engr.10
Engineering Analysis
•
Engineering analysis is a systematic process for analyzing
problems that arise in the various fields of engineering.
•
As part of the problem solving process, the data collected has to
be processed, analyzed and sometimes displayed graphically by
using various mathematical tools available.
•
In many cases, once you have defined and set up the problem
properly, numerical methods are required to solve the
mathematical equations.
•
Microsoft’s Excel spreadsheet software has many numerical
procedures built directly into its program structure.
2
Engineering
College of
Engr.10
San Jose State University
Welcome to the Computational Tools of Excel
3
Engineering
College of
Engr.10
San Jose State University
Introduction to Spreadsheets
-Data Analysis Tool that allows the user to:
• Store, process, and sorts data.
• Graphically display data.
• Perform statistical analysis.
• Fit equations to curves.
• Solve single and system of algebraic equations
• Solve optimization problems
• Draw Flow Charts ........
4
Engineering
College of
San Jose State University
menu bar
active
file name
standard
toolbar
formula bar
currently active
cell (A15)
drawing
bar
Engr.10
formatting
toolbar
AutoShapes
Help
“Cell” – the intersection of a row and a column
worksheet
selectors
worksheet tabs
5
Engineering
College of
San Jose State University
Entering Data into Cells (Cell Content)
Engr.10
6
Engineering
College of
San Jose State University
1.
Engr.10
Copying Cells
Copy/Paste cells:
1. Click on the Cells to be copied.
2. Select “Copy” on the “Edit” drop-down menu.
3. Click on the Cells to paste the copied contents.
4. Select “Paste” (or “Paste Special” ) on the “Edit” drop-down menu.
2.
Icons for Copy and Paste on the Standard Bar. Also, Ctrl C & Ctrl V.
3.
“Pull Down corner” at Lower Right Corner
(recommended for a range of cells)
1. place the cursor on the LRC of the active cell
2. Click and drag over the cell rage
4.
“Fill Down” : Select the cell containing the active formula
select (highlight) the range of cells you need to fill
7
Engineering
College of
Engr.10
San Jose State University
A
B
1
2
3
4
5
6
7 SUM:
8
1.
2.
2
5
10
15
34
Relative Addressing
C
3
1
4
5
15
D
E
internal equation
=B3+C3
=B4+C4
=B5+C5
=B6+C6
=SUM(D3:D6)
A
1
2
3
4
5
6
7 SUM:
8
B
C
D
E
Result
2
5
10
15
32
3
1
4
5
13
5
6
14
20
45
=B3+C3 adds the content of cells B3 and C3.
As the formula is copied into D4, D5 and D6,
cell addresses of the formula are incremented.
8
Engineering
College of
Absolute Addressing
San Jose State University
A
k=
1
2
3
4
5
6
7 SUM:
8
B
0.5
2
5
10
15
34
Engr.10
C
3
1
4
5
15
D
E
internal equation
=B3+C3+$B$1
=B4+C4+$B$1
=B5+C5+$B$1
=B6+C6+$B$1
=SUM(D3:D6)
A
k=
1
2
3
4
5
6
7 SUM:
8
B
0.5
C
D
E
Result
2
5
10
15
32
3
1
4
5
13
5.5
6.5
14.5
20.5
47
• Using the absolute cell address, which is
$Column$Row or $B$1, will keep the cell
reference constant for all applications.
• Application: a constant in a function.
9
Engineering
College of
Engr.10
San Jose State University
Basic Math Operations
Operation
algebraic
Excel Format
add
a+b
a+b
subtract
a-b
a-b
multiply
ab, axb,
divide
a/b
a/b
exponential
an
a^n
number
format
5.07x10 +12
5.07E12
a.b
a*b
5.07*10^12
3.15x10 -3
3.15E-3
3.15*10^(-3)
10
Engineering
College of
San Jose State University
Engr.10
Excel Formulas
• In Excel, a formula expresses dependency of one cell on others
in the worksheet.
• Formula entry for a Cell begins with clicking on the Cell first
and then either typing the equal sign “=“ in the Cell itself or
clicking on the Formula Bar
, and ends with “Enter”.
• Formula entry is aborted via the “Delete”.
• A Formula can be edited by first clicking on the Cell and then
editing the formula on the active Cell or on the Formula Bar.
• A Formula may contain functions.
Example
Math syntax: 3x2 + e(-0.3x) - 10x
Excel syntax: =3*(A15^2) + EXP(-0.3*A15) - 10*A15
The value of x is in cell A15
11
Engineering
College of
San Jose State University
Engr.10
Using Excel Built-in Functions
After clicking on the Cell
•
Click on the “Formula Bar” (fx), follow instructions on the “Insert Function”
window. Or, on the “Insert” drop-down menu, select “Function”.
•
Follow instructions on the “Function Argument” window, e.g., select the
value, or range of values for the function.
12
Engineering
College of
Engr.10
San Jose State University
Frequently Used Excel Functions
Math
Excel Syntax
Purpose: Returns the: (Assume value of x
is in cell A15.)
π
PI()
value of π (3.141593…)
ex
EXP(A15)
Value of ex where e is the base of
Natural Log
√x
SQRT(A15)
Value of the square root of x
log10 (x)
LOG10(A15)
Logarithm of x, with base 10
ln(x)
LN(A15)
Natural logarithm of x, with base e
SUM(x1,x2,x3)
SUM( A15:A17)
x1+x2+x3
cos(x)
COS(A15)
Cosine of x
sin(x)
SIN(A15)
Sine of x
tan(x)
TAN(A15)
Tangent of x
Average(x1,x2,x3)
AVERAGE(A15:A17)
(x1+x2+x3)/3
13
Engineering
College of
Engr.10
San Jose State University
Fundamentals - Example: “My Expense Table”
14
Engineering
College of
Engr.10
San Jose State University
“My Expense Table”- Aug. Expense
15
Engineering
College of
Engr.10
San Jose State University
“My Expense Table”- Aug. Expense (cont.)
16
Engineering
College of
San Jose State University
Engr.10
“Eliminating Repetition”
Repeat procedure for the
“Total” of each category
Place cursor in the lower right corner of cell
B11, “click-and-drug” along row 11 for the rest
of the total of the rest of the months
17
Engineering
College of
Engr.10
San Jose State University
“My Expense Table” - Completed
18
Engineering
College of
Engr.10
San Jose State University
MAX and MIN Functions
• =MAX or MIN(X1, X2, X3…) will take the maximum or
minimum of the numbers in the parentheses.
• =MAX or MIN(X1:X4) will take the maximum or minimum
of all the numbers from X1 to X4.
COUNT Function
• =COUNT(X1, X2, X3…) will count the number of
cells that contain numbers and the arguments in
the list that are numbers.
Example
=COUNT(A1, A2, A3) will return 2, because of the 4 and 9.
=COUNT(A1:A4) will return 3, because of the 4, 9 and 3.
=COUNT(A1:A4, -17, “world”) will return 4, because of the 4, 9, 3 and -17.
19
Engineering
College of
Engr.10
San Jose State University
COUNTIF Function
• =COUNTIF(range, criteria) will count the number of cells
in the range that match the criteria.
Note: if the criteria consists of a relational expression,
such as “>5”, it must be enclosed in double quotes.
Example
=COUNTIF(A1:A4, “>5”) will return 2,
because 6 and 9 are greater than 5.
=COUNTIF(A1:B4, “=6”) will return 3,
because three cells in the range
contain 6.
20
Engineering
College of
Engr.10
San Jose State University
IF Logical Function
• =IF(logical_test, value_if_true, value_if_false) returns the
second argument if the test is true, and the third if it is false.
Example
=IF(A1>3, “A1 is larger than 3”, 0) would return
“A1 is larger than 3”.
=IF(A4>3, “A1 is larger than 3”, 0) would return 0.
21
Engineering
College of
San Jose State University
Engr.10
HLOOKUP Function
• =HLOOKUP(lookup_value, table_array, row_index_number,
not_exact_match) finds the value in the top row of a table
and returns the corresponding column value.

Lookup_value: The value that the function looks
for in the top row
 Table_array: The table that the function looks through.
 Row_index_number: The row number from which the
function should return the value.
 Not_exact_match: Can be either True or False.
True means it will find the closest value to the
lookup value. False means you only want the value
returned if it is an exact match.
22
Engineering
College of
San Jose State University
Row 1 is not
in ascending
order
Engr.10
HLOOKUP Function - Example
=HLOOKUP (12, A1:E3, 2, False) means that you are looking in the second
row for the value corresponding to the value 12 in top row, and you are
looking for an exact match to 12. This would return $14.33.
=HLOOKUP (10, A1:E3, 2, False) means that you are looking in the second
row for the value corresponding to the value 10, and you are looking for an
exact match to 10. Since there is no 10 in top row, it would return #N/A.
=HLOOKUP (50, A1:E3, 3, True) means that you are looking in the third row
for the value corresponding to the value 50 in top row. Since there is no 50
in the top row, it returns the match corresponding to the largest value in the
top row that is less than the lookup value of 52. In this case, it returns 8.
If range lookup is TRUE, the values in the first row of table array must be placed in ascending order: ...-2, -1, 0, 1,
2,... , A-Z, FALSE, TRUE; otherwise, HLOOKUP may not give the correct value. If range lookup is FALSE, table
array does not need to be sorted.
23