CITS2401 Computer Analysis & Visualisation

Similar documents
CITS2401 Computer Analysis & Visualisation

Advanced Formulas and Functions in Microsoft Excel

LECTURE 10. SPREADSHEET

Excel 2. Module 2 Formulas & Functions

Formulas and Functions

A Tutorial for Excel 2002 for Windows

Excel. Tutorial 1 Getting Started with Excel. Tutorial 2 Formatting a Workbook. Tutorial 3 Working with Formulas and Functions COMPREHENSIVE

Agenda. Spreadsheet Applications. Spreadsheet Terminology A workbook consists of multiple worksheets. By default, a workbook has 3 worksheets.

Microsoft Office Excel Use Excel s functions. Tutorial 2 Working With Formulas and Functions

SUM - This says to add together cells F28 through F35. Notice that it will show your result is

Microsoft Excel 2010 Handout

Excel Shortcuts Increasing YOUR Productivity

Excel Working with Formulas and Functions. Using Relative References. Engineering Staff College of India

Data Service Center May, Compiled by: Katey Semmel Donna Frieze

MICROSOFT OFFICE APPLICATIONS

Using Basic Formulas 4

Excel Formulas and Functions

Laboratory 1. Part 1: Introduction to Spreadsheets

Part 1. Module 3 MODULE OVERVIEW. Microsoft Office Suite. Objectives. What is A Spreadsheet? Microsoft Excel

Getting Started with Excel

ICT IGCSE Practical Revision Presentation Spreadsheets. Columns. Rows. This is a range of cells. More than one cell has been selected.

EXCEL 2003 DISCLAIMER:

FAQ: Advanced Functions

Excel Intermediate. Click in the name column of our Range of Data. (Do not highlight the column) Click on the Data Tab in the Ribbon

EVALUATION COPY. Unauthorized Reproduction or Distribution Prohibited EXCEL ADVANCED

Business Data Analysis MA0123. Dr Gavin Shaddick Department of Mathematical Sciences 4W 5.7

Excel Expert Microsoft Excel 2010

Unit 12. Electronic Spreadsheets - Microsoft Excel. Desired Outcomes

Contents. 1. Managing Seed Plan Spreadsheet

Exploring Microsoft Office Excel 2007

Functions in Excel. Structure of a function: Basic Mathematical Functions. Arithmetic operators: Comparison Operators:

Microsoft Office Excel 2013 Courses 24 Hours

Basic Excel 2010 Workshop 101

Tutorial 2. Review CIS143

Pivot Table Project. Objectives. By the end of this lesson, you will be able to:

Chapter 4. Microsoft Excel

Excel Forecasting Tools Review

Microsoft Excel. Part 2: Calculations & Functions. Department of Computer Science Faculty of Science Chiang Mai University

Business Spreadsheets

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex

Excel Lesson 3 USING FORMULAS & FUNCTIONS

Microsoft Excel 2013 Series and Custom Lists (Level 3)

Excel 101. DJ Wetzel Director of Financial Aid Greenville Technical College

Excel Tips for Compensation Practitioners Weeks 9-12 Working with Lookup Formulae

Microsoft Excel Level 2

Creating a Spreadsheet by Using Excel

CALCULATE NPV USING EXCEL

Key concepts through Excel Basic videos 01 to 25

Use of spreadsheets in general

CUA Spreadsheets Laboratory

Spreadsheet Basics by Dick Evans, (updated )

Excel Tutorial 1

Create formulas in Excel

Advanced formula construction

Microsoft Excel 2007

Excel Simple Worksheets (with Functions)

MODULE VI: MORE FUNCTIONS

Excel 2016 Basics for Windows

EXCEL TUTORIAL.

M i c r o s o f t E x c e l A d v a n c e d P a r t 3-4. Microsoft Excel Advanced 3-4

Excel Formulas Cheat Sheet

What is a spreadsheet?

I OFFICE TAB... 1 RIBBONS & GROUPS... 2 OTHER SCREEN PARTS... 4 APPLICATION SPECIFICATIONS... 5 THE BASICS...

Definitions. Spreadsheet. Usefulness of Spreadsheets What do people use it for? Spreadsheet Page. Spreadsheet Cell

GENG2140 Lecture 4: Introduc4on to Excel spreadsheets. A/Prof Bruce Gardiner School of Computer Science and SoDware Engineering 2012

Using Excel for a Gradebook: Advanced Gradebook Formulas

Microsoft Office Excel 2007: Basic. Course Overview. Course Length: 1 Day. Course Overview

Section 6. Functions

MS EXCEL: TABLES, FORMATS, FUNCTIONS AND MACROS

Working with Data and Charts

Performing Basic Calculations

Microsoft Office Excel 2010: Basic. Course Overview. Course Length: 1 Day. Course Overview

March 28, Excel Essentials. Jim Snediker. Suzi Huisman

EXCEL EXPERT. Starting Excel EXPLORING THE EXCEL WINDOW

Computer & Careers Mr. Lewis

All Excel Topics Page 1 of 11

Introduction to Computer Applications CISY Zahoor Khan, Ph.D.

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

The Parts of a Function:

Formulas and Functions

Using Microsoft Excel

INTRODUCTION... 1 UNDERSTANDING CELLS... 2 CELL CONTENT... 4

Microsoft Excel 2016 LEVEL 2

Spreadsheet Applications Test

Intermediate Excel Training Course Content

Excel Intermediate

STAR OFFICE CALC. Lesson 6

Excel: Linking sheets and summary sheets (Mac OS)

Excel tutorial Introduction

Spreadsheet Basics. by Dick Evans,

Tutorial 1: Getting Started with Excel

Excel 2016 Basics for Mac

Working with Formulas and Functions

lab MS Excel 2010 active cell

Introduction to Excel 2013

Spreadsheets: Mathematics

GCSE CCEA GCSE EXCEL 2010 USER GUIDE. Business and Communication Systems

Adding records Pasting records Deleting records Sorting records Filtering records Inserting and deleting columns Calculated columns Working with the

Excel VLOOKUP. An EMIS Coordinator s Friend

In this section you will learn some simple data entry, editing, formatting techniques and some simple formulae. Contents

Transcription:

FACULTY OF ENGINEERING, COMPUTING AND MATHEMATICS CITS2401 Computer Analysis & Visualisation SCHOOL OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING Topic 0 Introduction to CITS2401

Notes What is CAV Why study CAV Tools: Excel, Matlab and Mathematica Topics Teaching Methods Assessment schedule

Computer Analysis and Visualisation Computer Analysis and Visualisation aims to provide student with the computing skills they will require to perform simulation and analysis in the Engineering and Science disciplines. The unit examines three commonly used tools: Excel, Matlab and Mathematica. Students will learn the basic principles of problem solving, analysis and visualisation using these tools.

Why study CAV? This unit aims to provide the tools that allow you to perform large scale repeatable analysis, simulation and visualization of datasets and models. The work of engineers and scientists frequently involves relating observable data and phenomena to models and simulations. Over the course of your study and career you will may encounter or formulate many different models that you need to simulate, data sets that you need to visualize, or complex procedures and calculations you need to automate. This unit will provide the basic skills to do this.

The Tools The tools we will examine cover three different paradigms in scientific computation: Microsoft Excel is a spreadsheet programme that allows basic analysis and organization of data. Mathworks Matlab is a programming environment built around the matrix data structure and widely used in numeric computation. Wolfram Mathematica has a very powerful symbolic computing engine and provides a functional programming environment.

Microsoft Excel

Microsoft Excel Excel allows data to be organised in a table format, and provides many common functions for manipulating data, collating data, numerical computations and displaying data. Advantages: Easy to use Ubiquitous Disadvantages: Slow, and scales poorly Statistics and other errors. Not free (but MS Office is $100 for students). OpenOffice Calc is a free alternative.

Mathworks Matlab

Matlab Matlab is a numerical computation environment and programming environment. The primary data structure is a matrix, and it provides a complete programming language optimized for matrix manipulations. Advantages: Powerful, and scales very well. Very good graphics and development environment Disadvantages: Expensive ($99 for students), Octave is a free alternative. Not as common as Excel. Can be more challenging to learn.

Wolfram Mathematica

Wolfram Mathematica Mathematica is a functional programming environment with a very powerful symbolic computing engine. Used in many complex scientific computing domains, and integrated with Wolfram Alpha computational knowledge engine Advantages: Very powerful. Disadvantages: Expensive, with no free alternative.

Unit Structure Each week you will be required to attend a two hour lecture and a three hour laboratory (one of four sessions). Four of the laboratories will be assessed. You will be required to complete the specified tasks and electronically submit your work. You will automated feedback and may submit as many times as you want (20%). Two of the laboratories will be in class tests (30%). There will be an end of semester exam (50%). Should you require further assistance there is a consultation time, a help forum, or you may contact the unit coordinator directly.

Unit Schedule Week Beginning Lecture Monday 3-5pm: Ross 1 July 30 Introduction to Computers, Analysis and Visualisation Laboratory Various Data Visualisation using Excel 2 August 6 Data Management using Excel Data Processing using Excel 3 August 13 Introduction to Matlab Expressions in Matlab - 4 August 20 Matlab Functions Simple Programs - Assessment 5 August 27 Structures and Files Iterative Functions Lab 1 (5%) 13th Sept, 5pm 6 September 3 Plotting and Graphics Data Processing - 7 September 10 8 September 17 - September 24 Matrix Operations Data Visualization Lab 2 (5%) 4th Oct, 5pm Linear Systems Lab Test 1 Lab Test 1 (10%) Mid-semester Break No Lab - 9 October 1 Curve Fitting Solving Linear Systems 10 October 8 Introduction to Mathematica Visualisation with Mathematica 11 October 15 Programming in Mathematica Mathematica Programming - - Lab 3 (5%) 20th Oct, 5pm - Lab 4 (5%) 1st Nov, 5pm 12 October 22 Symbolic Analysis Lab Test 2 Lab Test 2 (20%) 13 October 29 Course Review No lab -

FACULTY OF ENGINEERING, COMPUTING AND MATHEMATICS CITS2401 Computer Analysis & Visualisation SCHOOL OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING Topic 1 Introduction to Excel

Agenda Introduction to spreadsheet programs and their uses The spreadsheet's user interface Entering data in a worksheet Copying, pasting and filling cells Cell referencing Copying, pasting and deleting cell references Naming cell references Spreadsheet formulae Functions Function examples IF, PMT and VLOOKUP Dates Data type

Spreadsheet programs and their uses Bricklin and Frankston built the visible calculator to perform worksheet arithmetic. In 1984/85 Gates developed Excel for the Macintosh. It was one of the first spreadsheets to use a full GUI. Spreadsheets provide tools for working with numerical data. You can use a spreadsheet program to create budgets, balance sheets, and other types of number based documents. You can display your information in a traditional row-andcolumn format, or in a chart.

Worksheets have been used in a manual form for decades by bookkeepers and accountants. They represent tabular data in rows and columns with totals at the bottom of columns or right side of rows. The original electronic spreadsheets were simple automated versions of these.

The modern spreadsheet The modern spreadsheet is an extremely powerful application and used in a variety of fields beyond business accounting. It combines the elements of a calculator, word processor, database manager, graphing tool, modelling and forecasting tool and, an accounts ledger and supports powerful scripting (programming) languages to extend the power of the basic spreadsheet.

Why Use Spreadsheets? powerful, simple to use and it is possible to execute rapid analysis. can be applied to any discipline requiring data analysis. summarises raw data and produces information. results presented in a variety of forms. performs analysis and improves planning and modelling. has a range of in-built functions can apply analytical optimizing tools can build and simulate different models using scenario planning

You work in a document called a worksheet. Multiple worksheets are collected into a file called a workbook. A worksheet contains a 2D grid. The rows are labelled 1,2,3 and the columns labelled A, B, C Data is displayed in cells. A cell is the intersection of a row and column. Each cell has a unique address or reference given by the column letter and row number eg. first cell is A1. The cell currently in use is the active cell, and it is outlined by the cell pointer.

Information in worksheets exists at various levels. One level can be highly formatted as in the second column. The numerical value (column 3) associated with the cells is at a greater level of precision than is actually displayed. The actual content (column 4) of the cells are formulae, whose evaluation results in the values seen in the cells. Clearly the cells do not display the formulae since these are not the desired quantities, the resulting values are.

Labels -- text or numbers not used in calculations. Used for descriptive information. Values -- numbers that can be used in calculations. Integer, float, scientific notation, dates etc. Formulas -- commands to perform calculations based on numbers, cell references or functions. As in = AVERAGE(B1:B10) + 3.0 * STDEV(B1:B10)

Entering data - formulas and functions If a formula uses a value in another cell, the formula contains a cell reference, or the address of the referred cell. Formulas can refer to entire ranges (or blocks) of contiguous cells as well as individual cells. A function is a predefined routine that the spreadsheet provides to perform a specific type of calculation. You provide arguments that tell the function what data to use.

The cell formulae may result in one of several states Logical states -- TRUE or FALSE TRUE =10<100 Error Codes -- Err:503 - a divide by zero error Err:504 illegal parameter to a function #NAME? - using an unrecognised name #REF - refers to a cell that is not valid #VALUE - uses an incorrect argument or operand #### - not an error, the column is too thin for cell value

Pasting and filling adjacent cells Copying is selecting an active cell, copying the contents and then pasting this into a new cell. Filling has the contents of the active cell filled into a selection of cells by dragging the mouse over the region. Filling may be a single or a series fill depending on the data type of the active cell. A series fill increments values as cells are filled.

Controlled Series Fills Data Type Numbers Months Ordinals Selection 10 10, 15 Jan 1st Sem Result 10, 10, 10 10, 15, 20, 25 Jan, Feb, Mar 1st Sem, 2nd Sem The drag-fill method described above has a fixed behaviour and increment value for most cases. Fills can be customised through the menu selection Home -> Editing -> Fill ->Series. Options are Linear (a fixed additive increment), Growth (a fixed multiplicative term), Date or AutoFill.

Cell Referencing In formulae we may need to identify cell values to be included. This is called cell referencing, and references use row and column headings. references can be single or groups of cells. references identify values used during calculation. Relative references are just column and row labels, eg. B3. The cell addressed is relative to the current active cell. C 5 = B3 C5 has the value in the cell 2 rows up, 1 column to the left Absolute references prefixes column and row labels with $, eg. $B$3. The cell addressed is the exact cell to use. Mixed references use both reference types, eg. $B3 or B$3. In Excel, use Function Key F4 to switch between the cell reference types.

Cell referencing - ranges and worksheets Ranges of cells use the : separator eg. B3:D4. All cells between and including the two reference cells (B3 and D4) are included in the range ie. A 2 x 3 block of cells. In a spreadsheet you can reference ALL cells in the workbook. Formulae can include values in cells on other worksheets, by preceding any cell reference with the worksheet name (which is always an absolute reference), as in Sheet1!B3. The! is a separator and its right hand side can be any reference type. 3D references applies ranges in worksheets and cells eg. Sheet2:Sheet4!A1:D4.

Cell reference examples copying and filling in Relative references : the cell addressed is relative to the current active cell Relative references are updated automatically when pasted, eg. C10 containing =C1+C3+C5, is copied and pasted into D11, which now contains =D2+D4+D6. Absolute references : the cell addressed is the exact cell to use Absolute references are NOT updated when pasted eg. C10 containing =$C$1+ $C$3+$C$5, is copied and pasted into D11, which also contains =$C$1+$C$3+$C$5. Mixed references : the cell addressed is relative to the current active cell in either rows or columns. Mixed references have relative components updated, eg. C10 containing =$C1+ $C$3+C$5+C7, is copied and pasted into D11, which now contains =$C2+$C$3+D $5+D8.

Cell reference examples insert and delete All reference types are updated identically when inserting and deleting cells. Inserting cells will result in formulae being updated so the cell locations change but not the calculation results. Eg. C1 contains =A1+B1, a cell is inserted between A1 and B1, the cell (now designated D1) contains =A1+C1. Deleting cells will result in error if a reference is part of the deletion. Eg. D7 contains =D1+D2+D3+D4, row 2 is deleted resulting in a #REF! error.

Cell ranges example insert and delete References to cell ranges behave differently with respect to cell insertions and deletions. Eg. C1 contains =SUM(A1:B1), a cell is inserted between A1 and B1, the cell D1 contains =SUM(A1:C1) Eg. D7 contains =SUM(D1:D4), row 2 is deleted, the cell D6 contains =SUM(D1:D3) Range references automatically adjust with respect to cell deletions and additions. Use range referencing instead of specifying individual cells.

Naming cell references Cells and cell ranges can be referenced by name. a single set of names can be shared. named references are similar to a regular references. easier to read and understand the formulae, compare =ProjectMark*0.4 + ExamMark*0.6 =A7*0.4 + A12*0.6A You can update the reference in one place (including cell range) and everything automatically updates. Names can be created automatically from column and row titles

Defining Names Select the cell or cells, then choose the menu items Formulas ->Defined Names->Define Name Once defined, the name can be used to equivalently reference the selected cell or cells. Naming rules valid string starts with a letter or underscore, followed by letter, numbers, period, and underscore. However it must not look like a regular cell reference. no spaces allowed must be less than 255 characters is case insensitive

Formulae - basic facts The power of spreadsheets is in define formulae, that can operate over cells and ranges of cells, within worksheets and over ranges of worksheets, within workbooks and over ranges of workbooks. Elements of a formula operators, both arithmetic and logical (and others) cell reference (including names) literals (numbers and strings) functions and their arguments parentheses to define evaluation order and precedence entering a formula

Enter a forumula Defining formulae begins with an = sign in an empty cell. entered by hand in the formula box. cell references may be entered using the mouse to point to the relevant cell (particularly useful for defining ranges). Names can be entered by drawing down the Paste Name dialog box. This helps if you forget defined names. Formatting formulae Under Excel, to make a formula or text labels more readable it can contain line breaks. The line breaks are inserted by pressing Alt-Enter (Windows OS).

Editing Formulae Editing formulae make the cell active then click on the formula input line, or double click on the cell, you can then edit directly in the cell

Spreadsheet as a calculator By selecting the Insert Functions button next to the formula bar a function editing dialog is displayed. Typing formulae in the formula box (without pressing Enter) cause the result to be displayed in the palette.

Operators in formulae The operations allowed under both Excel are, Arithmetic Operations + Addition - Subtraction * Multiplication / Divison ^ & Exponentiation Text Concatenation Logic Comparations = Logical Equals <> Not Equal To < Less Than > Greater Than <= Less Than or Equal >= Greater Than or Equal

Formulae Examples ="Number is" & A1 & B1, produces the string Number is 123456, if A1 holds 123, and B1 holds 456. =B1^2, produces the square of the value in cell B1. A literal could be used, for instance =3^2, would result in 9. =B2 < B3, produces TRUE if the value in B2 is less than that in B3, FALSE otherwise. Values in B2 and B3 can be text, the comparison being based on alphabetical ordering. =OR(A1 < A2, A1 = 1000), produces TRUE if the value in A1 is less than that in A2, or the value in A1 is 1000. To avoid confusion over which operator has precedence during evaluation use parentheses (which can be (nested)).

Functions Modern spreadsheets provide a large range of worksheet functions for use within formulae. A function is a pre-defined set of instructions that you execute by making a function call like this, Name of the function Parentheses (required) =FunctionName(Arguments) Place the result of this function in this currently active cell {2,4} Sum 6 We take a black box approach to functions. We provide the input arguments in the form it requires, it returns the result of the operation over that data.

Function arguments can be... Cells, cell ranges or names, eg. =ROUND(C10;2) =SUM(A1:A20) =AVERAGE(Scores) Full-rows and -columns, eg. =SUM(A:A) Literals, eg. =LOG(214, 2) Expressions, eg. =SQRT(x^2 + y^2) Other functions (nesting), eg. =LOG(SQRT(A1); 3) A functional approach. Results of a function evaluation are returned, possibly as an argument to another function.

Why use functions? simplify formulae and provide reusable code =(A1+B1+C1+D1)/4 vs AVERAGE(A1:D1) permit formulae to execute calculations otherwise impossible to define in standard ways =MIN(A1:AB16000) speed up editing by using text manipulation functions =PROPER(A1) allows for conditional execution =IF(B2<B3 ; "It is less than" ; "It isn't less than")

Function example - IF Used to embed logic within a worksheet Relational and Logical operators can be used in a condition Text and numbers can be used in an If function Text must be enclosed within double quotation marks Numbers appear without quotation marks arg 2 =IF(Q1>=0, (-B1+SQRT(Q1))/2*A1, Root is Imaginary ) arg 1 arg 3 The IF function, it has 3 arguments, (1) a test which results in TRUE or FALSE, (2) the instructions to execute if the test is TRUE. (3) else the instructions to execute if the test is FALSE. arg 1 arg 2 arg 3

Function example - PMT Calculates the peoridically (e.g. monthly) payment for a loan Returns the amount to deduct each peroid (negative value) Parameters =PMT(rate, nper, pv, fv, type) rate : rate per period. In this case divide by 12 to obtain the monthly allocation nper : the total number of period (multiply the years by 12 for monthly payment) pv : present value, amount borrowed last 2 arguments can be omitted. =PMT(8.5%/12, 4*12, 10000) returns - $246.48

Function example - VLOOKUP Moves down the rows of a lookup table and matches a user specified lookupvalue with the first column of a lookup table. Return the information on the same row as the matching cell in the first column of the lookup table. Parameters =VLOOKUP(lookup_value, table_array, col_index_num, range_lookup) lookup_value : the key value to be found in the 1st column of the table array table_array : a range that holds the looked-for infomation col_index_num : a natural number indicates the column number in the table array from which the matching value must be returned. range_lookup : a logical value. TRUE for approximate match (default), FALSE for exact match.

Function example VLOOKUP Mail Delivery

Other built-in functions Functions entered into manually or via the paste function in Excel. Broad categories of functions are, financial - common business calculations date and time mathematical and trigonometric statistical Spreadsheet: lookup and reference database text logical information functions user defined The full list is seen by menu item Insert -> Function, and more information can be gained by using the help.

Formatting Every date is formed as the result of a number. That number is the number of elapsed days since 31 Dec 1899 (Windows) or since 1 Jan 1904 (MacOS). Hash signs (#) indicate that a column is not wide enough. Date formatting is controlled using the Format, Cells command sequence 1 A B C 13/3/2003 28/8/1958 =A1-B1 format as date type result as number type is 16268 (days old today) result as date type is 15/7/1944

Cell graphics Border Button or Border tab of Format dialog box Type of border Style of border Colour Button or Pattern Tab of Format dialog box Shading Colours Charts: next week..