Data processing in MathCAD. Data in tables Tables are analogous to matrices Tables are analogous to matrices The numbers of columns and rows can be dynamically.

Slides:



Advertisements
Similar presentations
PSOD Lecture 2.
Advertisements

MathCAD Data.
DAY 10: MICROSOFT EXCEL – CHAPTER 8 MICROSOFT EXCEL – CHAPTER 9 MICROSOFT EXCEL – CHAPTER 10 Akhila Kondai September 23, 2013.
E ngineering College of San Jose State University Engr.10 1 JKA & KY.
BCIS IB (Test 2) Excel Lessons 4 – 8 Press space bar to Advance Frame.
Applied Econometrics Second edition
Excel – Study Guide #2.
Microsoft Office XP Microsoft Excel
Decision Analysis Tools in Excel
Excel Notes Phys244/246 © 2007, B.J. Lieb. Calculating Velocity The velocity is calculated by entering the following: =(B3-B2) / (A3-A2). Then drag the.
INTRODUCTORY MICROSOFT EXCEL Lesson 4 – Worksheet Formulas
Excel Using Formulas and Functions Microsoft Office 2010 Fundamentals 1.
Chapter 07: Lecture Notes (CSIT 104) 1111 Exploring Microsoft Office Excel 2007 Chapter 7 Data Consolidation, Links, and Formula Auditing.
Using Complex Formulas, Functions, and Tables. Objectives Navigate a workbookNavigate a workbook Enter labels and valuesEnter labels and values Change.
Introduction to SPSS Allen Risley Academic Technology Services, CSUSM
An Introduction to MathCAD
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
Chapter 1 Databases and Database Objects: An Introduction
MathCAD Data. Data in tables Tables are analogous to matrix The numbers of columns and rows can be dynamically changed (in contrast to matrix) To enter.
Curve-Fitting Regression
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT EXCEL Lesson 4 – Worksheet Formulas.
MATHEMATICA What it can do for you.. Overview Uses of Mathematica How the program works Language rules EXAMPLES!
ADVANCED MICROSOFT POWERPOINT Lesson 6 – Creating Tables and Charts
Calibration & Curve Fitting
Chapter 2 Querying a Database
456/556 Introduction to Operations Research Optimization with the Excel 2007 Solver.
Mathcad Variable Names A string of characters (including numbers and some “special” characters (e.g. #, %, _, and a few more) Cannot start with a number.
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
Advanced Excel for Finance Professionals A self study material from South Asian Management Technologies Foundation.
October 2003Bent Thomsen - FIT 3-21 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
1 Lesson 19 Creating Formulas and Charting Data Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
1 Data List Spreadsheets or simple databases - a different use of Spreadsheets Bent Thomsen.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 2 1 Integrating Microsoft Office XP Tutorial 2 – Integrating Word, Excel, and Access.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. M I C R O S O F T ® Creating Charts Lesson 6.
PSOD Lecture 2. Matrices and vectors in Chemical & Process Engineering Appear in calculations when process is described by the system of equations:
Curve-Fitting Regression
Chapter 12 Creating a Worksheet.
1 After completing this lesson, you will be able to: Change the layout of a slide. Insert a clip art image. Scale an image. Insert and format a Microsoft.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
1 CA203 Presentation Application Adding Tables, Charts, and Diagrams Lecture # 9 By Tariq Ibn Aziz Dammam Community college.
Spreadsheet Data Tables Data Table 1 allows you to change one input variable’s value at a time and record the impact that the input assumption has on several.
PH24010 Data Handling and Statistics Use of MathCAD to handle statistical data Data storage in vectors and matrices MathCAD’s built-in functions: –Mean,
Excel 2007 Part (3) Dr. Susan Al Naqshbandi
Recap Cubic Spline Interpolation Multidimensional Interpolation Curve Fitting Linear Regression Polynomial Regression The Polyval Function The Interactive.
PERFORMING CALCULATIONS Microsoft Excel. Excel Formulas A formula is a set of mathematical instructions that can be used in Excel to perform calculations.
Spreadsheets What is Excel?. Objectives 1. Identify the parts of the Excel Screen 2. Identify the functions of a spreadsheet 3. Identify how spreadsheets.
Sensitivity Analysis A systematic way of asking “what-if” scenario questions in order to understand what outcomes could possibly occur that would effect.
McGraw-Hill/Irwin ©2009 The McGraw-Hill Companies, All Rights Reserved Business Driven Information Systems 2e Plug-In T3: Problem Solving Using Excel 2007.
Excel Spreadsheets Formatting and Functions ICS100 – Spring 2007 D. Pai.
Microsoft Office 2013 ®® Calculating Data with Formulas and Functions.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT EXCEL Lesson 4 – Worksheet Formulas.
Copyright © 2005 by Nelson, a division of Thomson Canada Limited 14-0 EXCEL CHAPTER 14 PHILIP BEDIENT.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
Microsoft ® Excel ® 2013 Enhanced Excel Tutorial 3 Calculating Data with Formulas and Functions.
Microsoft Excel Prepared by the Academic Faculty Members of IT.
Prepared by the Academic Faculty Members of IT. Tables Creating Tables. Merging Cells. Splitting Cells. Sorting Tables. Performing Calculations.
An electronic document that stores various types of data.
Chapter 28. Copyright 2003, Paradigm Publishing Inc. CHAPTER 28 BACKNEXTEND 28-2 LINKS TO OBJECTIVES Table Calculations Table Properties Fields in a Table.
Microsoft Excel 2007 Noris Bt. Ismail Faculty of Information and Communication Technology Tel : (Ext 8408) BCOMP0101.
Excel Chapter 1 Creating a Worksheet and an Embedded Chart
XP Practical OpenOffice.org Chapter 5 1 Creating a Worksheet.
Lesson 1: Learning Worksheet Fundamentals Microsoft Office Excel 2003 Lesson 1 Learning Worksheet Fundamentals.
Problem Solving Using Excel
International Computer Driving Licence Syllabus version 5.0
Excel: Formulas & Functions I Participation Project
Eviews Tutorial for Labor Economics Lei Lei
Learning Objectives: Creating a new Table Style
Bent Thomsen Institut for Datalogi Aalborg Universitet
Microsoft Excel 2007 – Level 2
Presentation transcript:

Data processing in MathCAD

Data in tables Tables are analogous to matrices Tables are analogous to matrices The numbers of columns and rows can be dynamically changed (in contrast to matrix) The numbers of columns and rows can be dynamically changed (in contrast to matrix) To enter table: To enter table:  Menu: Insert/Data/Table (MC v. 15)  In placeholder type variable name which will be assigned to table  In cells type the values  Each rows and columns must contains the same number of data. If data are missing the value ‘0’ will be assigned Access to data in table is similar to the one in matrix case. Access to data in table is similar to the one in matrix case.

Data in tables

Row/column appears in table when only 1 data is inserted into the cell: Row/column appears in table when only 1 data is inserted into the cell:  table size = specified cell in the lowest row and in last column  Unfilled cells contains 0  Once specified cell can not be removed!  To overcome problem: create new matrix with correct number of rows i and columns j using

External data sources: Data in files The most popular file formats accepted by MathCAD: The most popular file formats accepted by MathCAD:  Text files  Excel worksheets To insert text file containing data: To insert text file containing data:  Menu: Insert/Data/File Input  Chose file format  Browse to the file location  path could be relative or absolute  In the placeholder type variable name that will be assigned to the contents of file

Inserting the text file

Changes in the text file location Changes in the text file location

Inserting the Excel worksheets A range of Excel cells can be inserted into the MathCAD A range of Excel cells can be inserted into the MathCAD There can be more then one range in single insertion There can be more then one range in single insertion One variable is being assigned to one range One variable is being assigned to one range All variables forms a vector All variables forms a vector Cells can contain numbers as well as text (in contrast to table and text files, ver. 2001) Cells can contain numbers as well as text (in contrast to table and text files, ver. 2001) Worksheets can be edited (double-click) using all Excel functions (object embedded -Excel has to be installed in system). Worksheets can be edited (double-click) using all Excel functions (object embedded -Excel has to be installed in system).

Inserting the Excel sheets To insert worksheet: To insert worksheet:  Menu: Insert/Component/Excel  Browse file or create new  Choose number of ranges for input and output (relatively to Excel worksheet). If no data have to be inserted into the Excel worksheet fill inputs number by 0  Type ranges corresponding to outputs – e.g. A1:B10 (if worksheet name is different from Sheet1 type sheet name – e.g. Sheet4!A1:B10)  In placeholder(s) type variable(s)  Number of outputs/inputs and range of cells can be edited in properties of insertion

MathCAD files as data source in MathCAD Main MathCAD document can use data included in other MathCAD documents Main MathCAD document can use data included in other MathCAD documents Access to data is possible after embedding MathCAD file: Access to data is possible after embedding MathCAD file:  menu: Insert/References,  Brows the file  Below the insertion point all data, definitions from inserted file are valid in the main document but worksheet options from main document overwrite options in inserted document  Problem: matrix/vector elements numbers when array origin is different in main and inserted doc.

Data analysis and optimisation Approximation

definition Approximation is a part of numerical analysis. It is concerned with how functions f(x) can be best approximated (fitted) with another functions F(x) Approximation is a part of numerical analysis. It is concerned with how functions f(x) can be best approximated (fitted) with another functions F(x)

application Simplifying calculations when original function f(x) is defined by complicated expression Simplifying calculations when original function f(x) is defined by complicated expression design of continuous dependency when function f(x) is described on discrete set of arguments. If the form of approximating function is given only values of function parameters showing the best approximation have to be determine. design of continuous dependency when function f(x) is described on discrete set of arguments. If the form of approximating function is given only values of function parameters showing the best approximation have to be determine.

types of approximation Interpolating approximation Interpolating approximation Uniform approximation Uniform approximation Square-mean approximation Square-mean approximation

Interpolating approximation Needs to satisfy condition: function given f(x) and approximating function F(x) have the same values on the set of nodes and (sometimes) the same values of derivatives (if given) too. Needs to satisfy condition: function given f(x) and approximating function F(x) have the same values on the set of nodes and (sometimes) the same values of derivatives (if given) too.

Uniform approximation Function F(x) approximating function f(x) in the range [a,b], satisfying condition: maximal residuum is set to minimum Function F(x) approximating function f(x) in the range [a,b], satisfying condition: maximal residuum is set to minimum

Square-mean approximation Approximating function is determined by the use of condition: Approximating function is determined by the use of condition: Geometrically condition means: The area between curves representing functions have to reach minimum.

Condition for discreet set of arguments: Condition for discreet set of arguments: Square-mean approximation

Function: Function: minimize(function, p1, p2,...) can be used to determine parameters of approximating function minimizing the sum of square deviations between values given in the table and calculated from the function. can be used to determine parameters of approximating function minimizing the sum of square deviations between values given in the table and calculated from the function.  function calculates the sum of square deviations as a function of parameters.  p1, p2 – parameters of approximating function Square-mean approximation in MathCAD

Approximating algorithm: Approximating algorithm: 1. Insert data to be approximated 2. Build the approximating function 3. Create a counting variable with values from 0 to number of data minus 1 4. Build function E that calculates sum of square of deviations with parameters of approximating function as variables 5. Assign starting values of parameters 6. Use the function minimize to minimize the E function (deviations). Square-mean approximation in MathCAD

Advantageous of minimize function: Advantageous of minimize function:  simple  explicit  suitable for any approximating function  can be used in optimisation problem solving

Other MathCAD tools for approximation

genfit Syntax: c:=genfit(X, Y, c0, F) Syntax: c:=genfit(X, Y, c0, F)  X – vector of independent values from data set  Y - vector of dependent values from data set  c0 – starting vector of searched parameters  F – vector function of independent variable and vector c, consists of approximating function and its derivatives on parameters  c - vector of searched parameters

regress Approximation by polynomial function Approximation by polynomial function  Syntax: Z:= regress(X, Y, s)  X – vector of independent values from data set  Y - vector of dependent values from data set  s – polynomial degree  Z – result: vector, s+1 last elements are parameters of polynomial (starting from x 0 parameter)

Linear, cubic, polynomial - spline interpolating approximation Approximation by linear (cubic etc.) spline function Approximation by linear (cubic etc.) spline function  Syntax: Z:=lspline(X, Y) (cspline, pspline)  X – vector of independent values from data set  Y - vector of dependent values from data set  Data in set has to be sorted! Manually or by use of function csort: W:=csort(W,i), W – matrix of data, i – nr of ordering column  Z – result: vector of parameters of cubic spline function

Can be derivate Can be integrate

Interpreting function Operates on vectors obtained from regress and spline family functions Operates on vectors obtained from regress and spline family functions Building the continuous approximating function on the base of determined parameters Building the continuous approximating function on the base of determined parameters Syntax: F(x):=interp(Z, X, Y, x) Syntax: F(x):=interp(Z, X, Y, x)  Z – vector given by approximating function  X – vector of independent values from data set  Y - vector of dependent values from data set  x – independent variable (local) Interpreting function is implicit but can be derivated and integrated Interpreting function is implicit but can be derivated and integrated

MathCAD The animation

Animation Enhances understanding of numerical output Enhances understanding of numerical output Animations shows time dependences in real time, as well as speeded up or slowed down. Animations shows time dependences in real time, as well as speeded up or slowed down. Make impression on viewers Make impression on viewers

Animation Base of animation is variable called: Base of animation is variable called:FRAME  Built in, integer type  Definition only in dialog box of animation  Parameters are:  starting value  ending value  frame rate (frames per seconds)

Creating animation Solve a problem (e.g. create function) Solve a problem (e.g. create function) Assign counting variable to FRAME Assign counting variable to FRAME Define a variable representing each state of solution assigned to counting variable Define a variable representing each state of solution assigned to counting variable Create plot to animate Create plot to animate Select plot area Select plot area Display animate dialog box and select plot Display animate dialog box and select plot Define FRAME variable parameters Define FRAME variable parameters Choose format of compression for animation recording. Choose format of compression for animation recording. Press Animate button. Press Animate button.