An Introduction to MathCAD

Slides:



Advertisements
Similar presentations
MathCAD Data.
Advertisements

Lecture (14,15) More than one Variable, Curve Fitting, and Method of Least Squares.
Basis Expansion and Regularization Presenter: Hongliang Fei Brian Quanz Brian Quanz Date: July 03, 2008.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
1 Curve-Fitting Spline Interpolation. 2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression.
Notes Over 6.9Writing a Cubic Function Write the cubic function whose graph is shown.
CITS2401 Computer Analysis & Visualisation
Lecture 11 Chap. 15. Outline Interpolation – Linear Interpolation – Cubic Spline Interpolation – Extrapolation 15.2 Curve.
Copyright © 2012 Pearson Education, Inc. 2.3 Another Look at Linear Graphs ■ Graphing Horizontal Lines and Vertical Lines ■ Graphing Using Intercepts ■
Graphing Using Slope - Intercept STEPS : 1. Equation must be in y = mx + b form 2. Plot your y – intercept ( 0, y ) 3. Using your y – intercept as a starting.
PH36010 Numerical Methods Advanced Plotting and Animation.
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
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.
1cs426-winter-2008 Notes  Ian Mitchell is running a MATLAB tutorial, Tuesday January 15, 5pm-7pm, DMP 110 We won’t be directly using MATLAB in this course,
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
Regression in EXCEL r2 SSE b0 b1 SST.
Derivatives and Differential Equations
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.
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
Introduction to MATLAB for Engineers, Third Edition Chapter 6 Model Building and Regression PowerPoint to accompany Copyright © The McGraw-Hill Companies,
Chapter 15 Modeling of Data. Statistics of Data Mean (or average): Variance: Median: a value x j such that half of the data are bigger than it, and half.
Interactive Graphics Lecture 9: Slide 1 Interactive Graphics Lecture 9: Introduction to Spline Curves.
Introduction to Computer Graphics with WebGL
Regression analysis Control of built engineering objects, comparing to the plan Surveying observations – position of points Linear regression Regression.
Recap Summary of Chapter 6 Interpolation Linear Interpolation.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Curve-Fitting Regression
PH15010 Laboratory Techniques - An Introduction to MATHCAD.
Course 13 Curves and Surfaces. Course 13 Curves and Surface Surface Representation Representation Interpolation Approximation Surface Segmentation.
June D Object Representation Shmuel Wimer Bar Ilan Univ., School of Engineering.
CO Games Development 1 Week 12 Interpolation, Path Smoothing & Splines
Unit 1, Chapter 2 Integrated Science. Unit One: Forces and Motion 2.1 Using a Scientific Model to Predict Speed 2.2 Position and Time 2.3 Acceleration.
An Introduction to MathCAD You can always find a solution !!
PH15720 Laboratory Techniques - An Introduction to MATHCAD.
The Best Method of Noise Filtering Yuri Kalambet, Sergey Maltsev, Ampersand Ltd., Moscow, Russia; Yuri Kozmin, Shemyakin Institute of Bioorganic Chemistry,
Jump to first page Chapter 3 Splines Definition (3.1) : Given a function f defined on [a, b] and a set of numbers, a = x 0 < x 1 < x 2 < ……. < x n = b,
Recap Cubic Spline Interpolation Multidimensional Interpolation Curve Fitting Linear Regression Polynomial Regression The Polyval Function The Interactive.
Cubic Spline Interpolation. Cubic Splines attempt to solve the problem of the smoothness of a graph as well as reduce error. Polynomial interpolation.
PH24010 MathCAD More Curve Fitting. Previously on PH24010 Linear Fitting slope(), intercept() line() Pre-process Y-data: –y = k/x –y = e kx.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 15 General Least Squares and Non- Linear.
PH15720 Laboratory Techniques - An Introduction to MATHCAD.
Lecture 6 - Single Variable Problems & Systems of Equations CVEN 302 June 14, 2002.
Recap Functions with No input OR No output Determining The Number of Input and Output Arguments Local Variables Global Variables Creating ToolBox of Functions.
PH15010 Laboratory Techniques - An Introduction to MATHCAD.
10 th International PHOENICS Conference PHOENICS May 2004.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 4 Chapter 17 and 18 Interpolation.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
MATLAB ® for Engineers, Holly Moore Fourth Edition, Global Edition © Pearson Education Limited 2015 All rights reserved. Figure 13.1 Interpolation between.
 Polynomial – A monomial or a sum of monomials The standard form of a polynomial lists the terms in descending order of degree.
Algebra 3 5.1/2 Systems of Linear Equations/Matrices.
Lecture 29: Modeling Data. Data Modeling Interpolate between data points, using either linear or cubic spline models Model a set of data points as a polynomial.
ECE3340 Numerical Fitting, Interpolation and Approximation
EEE 244-7: Curve Fitting.
Slope Intercept Form.
F-IF.C.7a: Graphing a Line using Slope-Intercept, Part 2
Beams and Frames.
11.2 Graphical Techniques Syed Arshad Mushtaq.
Objective- To use slope and y-intercept to
2.4 Writing the Equation of a Line
Today (2/11/16) Learning objectives (Sections 5.1 and 5.2):
Slope Intercept Form.
2.4 Writing the Equation of a Line
9.3 – Graphing Linear Equations
8/29/12 Writing the Equation of a Line
Nonlinear regression.
Using Factoring To Solve
Forms of a linear equation
2-4: Writing Linear Equations Using Slope Intercept Form
Graphic and Other Object in Origin
2.4 Writing the Equation of a Line
Presentation transcript:

An Introduction to MathCAD Animation, Interpolation and other pretty pictures 1 1

Animation Example Example from our LCR circuit

Animation #2 Basics Use FRAME variable FRAME automatically set by mathCAD for each frame of animation Select View|Animation… to bring up animation dialog Give start & end values for FRAME Select area to animate Select Animate to produce Save As… to create .avi file

Animation #3 Hints “Error initialising Video Stream” => Nothing Selected May want to scale FRAME Animations can: Take a long time to create Produce big files Windows video player allows thumb bar to step forward & back

Animation #4 More Hints Fix scale on graphs Don’t need to include calculations in animation Echo FRAME= in shot If scaling, echo scaled variable For frequency plots, scale FRAME thus:

Vector Field Plots #1 Plot matrix of complex numbers Each point shown as vector Plot scaled so that largest vector is gap between points Useful for: Electric fields Magnetic fields Dynamic Flows Plotting Gradient of functions

Vector Field Plots #2

Data Analysis #1 Get data from file Read data in from datafile Use either: Insert|Component|File Read or Write & follow the wizard READPRN(“filename”) Reads data from file into vector or matrix File Read component offers many more file types

Data Analysis #2 Select the data we want Use matrix functions to select data we are interested in Rows(M) & Cols(M) to get size of data array Submatrix(M,rs,rf,cs,cf) to select rectangular chunk M<x> to select column Csort to sort array Augment & stack to build arrays

Data Analysis #3 Smoothing Data medsmooth(vy,n) returns vy smoothed with running medians

Data Analysis #4 Linear regression Slope & intercept functions take vectors of X & Y values

Data Analysis #5 Interpolation 2 stage process Fit polynomial through points cspline – cubic spline Bspline – B-spline Interpolate using polynomial obtained in stage 1 interp

Cubic Spline fit & Interpolated Fit

Function Fitting Cspline & Bspline fit smooth curve through data points In physical modelling, we know the shape of the function to fit, just need parameters Example: Response of photon counting detector

Function Fitting Example #1 Determine parameters a & b

Function Fitting Example #2 Rewrite f(x) and derivatives Replace a,b by u0, u1… Find partial derivatives of f(x) Create vector of function & pds

Function fitting Example #3 Create vector of guess values Call genfit to solve Define function using params

Function Fitting Example #4 Plot f(x) against data