excel 2003 tutorial 4 graphs
TRANSCRIPT
Excel: Using LINEST function, Plotting agraph, Adding Error Bars
Raghav K Chhetri01/24/2009
Using LINEST function
NOTE: I mistakenly put (m) for the unit of time.
• Lets start with a tablefor time and velocity asshown on the right.
• LINEST functionreturns several outputs,so to begin with, select a2 by 5 array as shown.
Under the Insert Tab, select Function. Then, make theselections as shown below. Hit OK.
Select the y-values and x-values from the table.
Write ‘TRUE’ for the last two boxes. Hit OK.
Now, highlight the formula in the formula bar.
Press Ctrl+Shift simultaneously and hit Enter (Macusers, press Command and hit Enter)
Linest Function
• The array weselected earlieris now filledwith numbersas shown tothe right
• Lets see whatsome of thesenumbers mean
Linest Function
Plotting a graph• Select the x-column first.
Hold down the CRTL keyand select the y-columnnext.
• Choose XY scatter, undersubtype, select the first one asshown
Plotting a graph
• Give an appropriate titleto the graph
• Label the axes (Don’tforget the UNITS!!)
Plotting a graph
• Select ‘As new sheet’. Name the sheetappropriately.
Plotting a graph
• Highlight the data points, select ‘Add Trendline’
Plotting a graph
• Choose ‘Linear’ under‘Type’
• Select the options todisplay equation andR^2 value on chart
Adding Error BarsNow that we have the plot, lets add the error bars.
• Select the data points andright click
• Select ‘Format Data Series’
Adding Error Bars• Click on the ‘X Error Bar’
tab
• Select ‘Both’
• Under ‘Custom’, click on thewidget on the right of the +box
• Go back to the data sheetand select the uncertainty inx-values (next slide)
Adding Error Bars
• Select the uncertaintyas shown, then click onthe widget on the right
• Repeat the same forthe - box once donewith the + box
• This adds the errorbars in the X-direction
Adding Error Bars
• Repeat thesame procedurefor puttingerror bars in theY direction
• Once done,your graphshould look asshown to theright
The End.