Spread Sheet For Engineers
Spread Sheet For Engineers
Spread Sheet For Engineers
Lab Manual
2. Problem analysis: Identify, formulate, research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural
sciences, and engineering sciences.
5. Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modelling to complex engineering
activities with an understanding of the limitations.
6. The engineer and society: Apply reasoning informed by the contextual knowledge to assess
societal, health, safety, legal and cultural issues and the consequent responsibilities relevant
to the professional engineering practice.
8. Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
9. Individual and team work: Function effectively as an individual, and as a member or leader
in diverse teams, and in multidisciplinary settings.
11. Project management and finance: Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
12. Life-long learning: Recognize the need for, and have the preparation and ability to engage
in independent and life-long learning in the broadest context of technological change.
JSS MAHAVIDYAPEETHA
JSS ACADEMY OF TECHNICAL EDUCATION, BENGALURU
Affiliated to Visvesvaraya Technological University, Belagavi, Karnataka, INDIA
Approved by All India Council for Technical Education, New Delhi
UG programs accredited by NBA: ECE, CSE, ISE, CIVIL, E & IE and MECHANICAL
Course: Spread Sheet for Engineers Course Code: 21MT481 Sem/Sec: 4th
Name of the Faculty: Dr. BV Raghavendra+ Dr. J S Srikantamurthy
CO-PO PO1 PO2 PO3 PO4 PO5 PO6 PO7 P08 PO9 PO10 PO11 PO12
CO1 3 - - - - - - - - - - 2
CO2 3 - - - 3 - - - - - - 2
CO3 3 - - - 3 - - - - - - 2
CO4 - - - - 3 - - - - - - 2
Average 3 - - - 3 - - - - - - 2
38
11
Differential Equations: Euler's Method, Modified Euler's Method, The Runge Kutta Method, Solving a Second
12 Order Differential Equation
38
39
39
Spread Sheets for Engineers
1. Charting: Create an XY scatter graph, XY chart with two Y-Axes, add error bars to your plot,
and create a combination chart
100 100
90
Scatter Graph 90
Two Y Graph
Subject-1
80 80
Subject-1 Subject-2
Marks
70
Marks
70
60
Subject-2
60
50
40 50
30 40
0 5 10
Students
Student Name
Error Graph
100.00 Average
80.00
60.00
40.00
20.00
0.00
Subject-1 Subject-2
Combination Graph:
Student Subject-1 Subject-2 Percentage
https://www.youtube.com/watch?v=RWwpkwvXRN4 Rama 84 68 76
Select below table data
>Insert>Column>Select type of graph Krishna 56 82 69
>Layout>Axis Title, Axis Horizontal, Axis Vertical Eshwara 63 56 59.5
Primary,
Axis Vertical Secondary Geetha 44 66 55
>Format Axis, Change Maximum and Minimum Pooja 72 48 60
>Layout>Chart Area>Percentage
Vasanth 59 64 61.5
> Format Selection>Secondary Axis
100 100
Combination Graph 95
90
Subject-1 90
80 Subject-2 85
Percentage
70 Percentage 80
Marks
75
60 70
50 65
60
40
55
30 50
Rama Krishna Eshwara Geetha Pooja Vasanth
Students
2. Functions: Computing Sum, Average, Count, Max and Min, Computing Weighted Average,
Trigonometric Functions, Exponential Functions, Using the CONVERT Function to Convert
Units.
Trigonometric Functions:
Radian=Cell*PI()/180
Sin=SIN(Cell Num)
Cos=COS(Cell Num)
Tan=TAN(Cell Num)
Cot=TANH(Cell Num)
Sec=COSH(Cell Num)
Co-Sec=SINH(Cell Num)
Angle in Angle in
Sin Cos Tan Cot Sec CoSec
Degree Radian
=Cell*PI()/18 =SIN(Cell =COS(Cell =TAN(Cell =TANH(Cell =COSH(Cell =SINH(Cell
0 Num) Num) Num) Num) Num) Num)
0 0 0 1 0 0 1 1
45 0.785398 0.707107 0.707107 1 0.6557942 1.324609 1.324609
90 1.570796 1 6.13E-17 1.63E+16 0.9171523 2.509178 2.509178
180 3.141593 1.23E-16 -1 -1.2E-16 0.9962721 11.59195 11.59195
225 3.926991 -0.70711 -0.707107 1 0.9992239 25.38686 25.38686
270 4.712389 -1 -1.84E-16 5.44E+15 0.9998386 55.66338 55.66338
315 5.497787 -0.70711 0.707107 -1 0.9999664 122.0776 122.0776
360 6.283185 -2.5E-16 1 -2.5E-16 0.999993 267.7468 267.7468
Exponential Functions:
Function=EXP (Value)
e^2 7.389056
Table Abbreviations:
The following abbreviated unit prefixes can be prepended to any metric from_unit or to_unit:
Logical Expressions:
One of the most common uses of the Excel AND function is found in the logical test argument of the IF
function to test several conditions instead of just one. For example, can nest any of the AND functions above
inside the IF function and get a result.
Y= aX^2+bX+c
Y= 2X^2-4X+4
a 2
b -4
c 1
Function= X=-b+/- SQRT(b^2-4ac)/2a
X1 1.707107 X1=-b+SQRT(b^2-4ac)/2a
X2 0.292893 X2=-b- SQRT(b^2-4ac)/2a
VLOOKUP Function:
=VLOOKUP(M34,L28:M32,2,FALSE)
Use function VLOOKUP and enter the cell numbers in the arguments
1 Harian 20
2 Karn 40
3 Tamil 10
4 Andra 70
5 Delhi 50
Name Andra
Prince 70
4. Regression Analysis: Trend line, Slope and Intercept, Interpolation and Forecast, The LINEST
Function, Multilinear Regression, Polynomial Fit Functions, Residuals Plot, Slope and Tangent,
Analysis Tool Pack.
Regression Analysis: Trend line, Slope and Intercept, Interpolation and Forecast, The LINEST Function
X Y
1 9
2 13
3 17
4 21
5 25
Using functions:
Slope 4 =SLOPE(Yrange, X range)
Intercept 5 =INTERCEPT(Y range, X range)
Trend X=0 5 =TREND(Y range, X range, New X,Const)
Trend X=10 45
Slope 4 5 Y Intercept
Uncertainty Slope 3.24317E-16 1.07564E-15 Uncertainty Y Intercept
R^2 1 1.02558E-15 se(y)
F 1.52118E+32 3 df
SS reg 160 3.15544E-30 ss resid
Ctr+Shift+Enter
30 y = 4x + 5
25
20
15
10 Series1
5
0
1 2 3 4 5
Multilinear Regression, Polynomial Fit Functions, Residuals Plot, Slope and Tangent, Analysis Tool Pack
Regression:
Data>Data Analytics>Descriptive Statistics>Input cell>output cell>Summary statistics
Column1
Mean 17
Standard Error 2.828427
Median 17
Mode #N/A
Standard Deviation 6.324555
Sample Variance 40
Kurtosis -1.2
Skewness 0
Range 16
Minimum 9
Maximum 25
Sum 85
Count 5
Multilinker Regression:
SUMMARY OUTPUT
Regression Statistics
Multiple R 1
R Square 1
Adjusted R
Square 1
Standard Error 1.03E-15
Observations 5
ANOVA
Significance
df SS MS F F
Regression 1 160 160 1.52E+32 1.1754E-48
Residual 3 3.16E-30 1.05E-30
Total 4 160
-1E-15 10 Y
0 Predicted Y
0 2 4 6
-2E-15
X Variable 1 X Variable 1
5. Iterative Solutions Using Excel: Using Goal Seek in Excel, Using the Solver to find roots, Finding
Multiple Roots, Optimization Using the Solver, Minimization Analysis, Nonlinear Regression Analysis.
Goal Seek
Total Amount
S.No Product Price Unit (Rs.)
1 Product A 195 30 5850
2 Product B 35 20 700
3 Product C 50 0
Grand Total 50 6550
Target 15000
Total Amount
S.No Product Price Unit (Rs.)
1 Product A 195 30 5850
2 Product B 35 20 700
3 Product C 50 169 8450
Grand Total 219 15000
Target 15000
Using the Solver to find roots:
Maximize P=3X1+2X2-X3
Constraints
X1+3X2+X3<=9
2X1+3X2-X3>=2
3X1-2X2+X3>=5
X1>=0, X2>=0, X3>=0
Variables Solution
X1 0 Variables
X2 0 X1 9
X3 0 X2 0
X3 0
P 0
P 27
Constraints Inequalities
1 0 <= 9 Constraints Inequalities
2 0 >= 2 1 9 <= 9
3 0 >= 5 2 18 >= 2
4 0 >= 0 3 27 >= 5
5 0 >= 0 4 9 >= 0
6 0 >= 0 5 0 >= 0
6 0 >= 0
Sum= 0.001833455
8.00
y
Nonlinear Regression
7.00
6.00
5.00
y = 1.4016ln(x) + 0.9798
R² = 0.9985
4.00
y Measured
3.00
2.00 x
0.00 20.00 40.00 60.00 80.00 100.00
Solution:
Actual Estimated
a 0.50 0.54
b 2.00 1.98
c 1.50 1.50
Estimated
Normalized
x Measured y Measured y Estimated Error^2 x Plot y Plot
18.34 5.07 5.02 0.00 5.00 3.35
79.87 7.16 7.14 0.00 10.00 4.20
85.10 7.26 7.24 0.00 15.00 4.74
10.52 4.25 4.26 0.00 20.00 5.14
44.46 6.28 6.28 0.00 25.00 5.45
69.57 6.91 6.94 0.00 30.00 5.72
8.96 4.04 4.06 0.00 35.00 5.94
86.20 7.26 7.26 0.00 40.00 6.13
66.86 6.90 6.88 0.00 45.00 6.30
16.87 4.87 4.90 0.00 50.00 6.46
52.27 6.52 6.52 0.00 55.00 6.60
93.92 7.34 7.38 0.00 60.00 6.72
24.35 5.43 5.42 0.00 65.00 6.84
5.12 3.38 3.38 0.00 70.00 6.95
25.13 5.46 5.46 0.00 75.00 7.05
34.04 5.90 5.90 0.00 80.00 7.15
61.44 6.80 6.76 0.00 85.00 7.24
42.70 6.19 6.23 0.00 90.00 7.32
39.53 6.07 6.11 0.00 95.00 7.40
29.99 5.74 5.71 0.00 100.00 7.48
Sum 0.000375851
8.00
y
2.00 x
0.00 20.00 40.00 60.00 80.00 100.00
Department of Mechanical Engineering-JSS ATE, Bengaluru Page No. 15
Spread Sheets for Engineers
6. Matrix Operations Using Excel: Adding Two Matrices, Multiplying a Matrix by a Scalar, Multiplying
Two Matrices, Transposing a Matrix, Inverting a Matrix and Solving System of Linear Equations
Matrix A*B
Multiplying Two Matrices: Matrix A Matrix B
2 3 1 5 3 6 31 22 26
>Create matrix A and B 3 4 2 6 4 2 45 33 42
Matrix AXB= 4 7 5 3 4 8 77 60 78
Select Cells equal to size of Matrix in a new cell
>=MMULT(Select matrix A, Select matrix B)
>Ctrl+Shift and Enter
Transposing a Matrix:
Inverse of a Matrix:
Matrix A Inverse of A
>Create matrix A 2 3 1 -2 2 -0.5
Inverse of Matrix A= 3 4 2 1.8 -2 0.25
Select Cells equal to size of Matrix in a new cell
>=MINVERSE(Select matrix A) 4 7 5 -1 0.5 0.25
>Ctrl+Shift and Enter
7. VBA User-Defined Functions (UDF): The Visual Basic Editor (VBE), The IF Structure, The Select Case
Structure, The For Next Structure, The Do Loop Structure, Declaring Variables and Data Types, An Array Function The
Excel Object Model, For Each Next Structure.
https://youtu.be/BTtqrXYliMs
https://www.youtube.com/watch?v=NpvvwrdDcQk
https://www.techonthenet.com/excel/formulas/if_then.php
https://www.youtube.com/watch?v=I2auhdHDyXk (Object Tutorials)
If-Else Statement:
LRegion = Range("A2").Value
Else
LRegionName = "Not Assigned"
End If
Range("B2").Value = LRegionName
End Sub
Case 2
MsgBox "You entered 2"
Case 3
MsgBox "You entered 3"
Case 4
MsgBox "You entered 4"
Case 5
MsgBox "You entered 5"
End Select
End Sub
For Next Statement:
Private Sub Forloop_Click()
Dim x As Integer
Dim i As Integer
x = InputBox("Enter Input Number to multiple by 1 to 5")
For i = 1 To 5
Cells(15 + i, 3) = i
Cells(15 + i, 4) = x
Cells(15 + i, 5) = x * i
Next
End Sub
Do Loop Statement:
_______________________________________
8. VBA Subroutines or Macros: recording a Macro, Coding a Macro Finding Roots by Bisection, Using
Arrays, Adding a Control and Crating User Forms.
Option Explicit
__________________________________________________
Function f(h)
Dim r As Double, V As Double, Pi As Double
r = Radius '3.048 'Range("Radius")
V = Volume '1.89 ' Range("Volume")
Pi = 4 * Atn(1)
f = h ^ 3 - 3 * r * h ^ 2 + 3 * V / Pi
End Function
________________________________________
Cells(16 + i, 10) = i
Cells(16 + i, 11) = x1
Cells(16 + i, 12) = x2
Cells(16 + i, 13) = xmid
Next i
'Bisect1 = xmid
Depth = FormatNumber(xmid, 2)
End Sub
____________________________________________________
Private Sub Quit_Click()
UserForm_Bisect.Hide
End Sub
______________________________________________________
Private Sub Reset_Click()
Unload UserForm_Bisect
UserForm_Bisect.Show
End Sub
1 0 5 5
2 0 2.5 2.5
3 0 1.25 1.25
4 0.625 1.25 0.625
5 0.625 0.9375 0.9375
6 0.625 0.78125 0.78125
7 0.703125 0.78125 0.703125
8 0.742188 0.78125 0.742188
9 0.761719 0.78125 0.761719
10 0.771484 0.78125 0.771484
11 0.776367 0.78125 0.776367
12 0.776367 0.778809 0.778809
13 0.776367 0.777588 0.777588
14 0.776978 0.777588 0.776978
15 0.777283 0.777588 0.777283
16 0.777283 0.777435 0.777435
17 0.777283 0.777359 0.777359
18 0.777321 0.777359 0.777321
19 0.77734 0.777359 0.77734
20 0.777349 0.777359 0.777349
Demo 9 and 10
https://www.youtube.com/watch?v=DatyXtowK70
https://www.mclennan.edu/scholar-
day/docs/spring2021/John%20Patterson%20Simpsons%20Rule%20with%20Excel.pdf Simson Rule