Mathcad Variable Names A string of characters (including numbers and some “special” characters (e.g. #, %, _, and a few more) Cannot start with a number.

Slides:



Advertisements
Similar presentations
(MICROSOFT EXCEL). Is a spreadsheet application designed to take advantage of the windows graphical interface MICROSOFT EXCEL.
Advertisements

PSOD Lecture 2.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Lesson 3 Working with Formulas.
Introduction to arrays
Excel Part I Basics and Simple Plotting Section 008 Fall 2013 EGR 105 Foundations of Engineering I.
Introduction to MATLAB for Biomedical Engineering BME 1008 Introduction to Biomedical Engineering FIU, Spring 2015 Lesson 2: Element-wise vs. matrix operations.
Introduction to Excel Formulas, Functions and References.
Microsoft Office XP Microsoft Excel
Lesson 14 Creating Formulas and Charting Data
Understanding Microsoft Excel
Objectives 1.Identify the functions of a spreadsheet 2.Identify how spreadsheets can be used. 3.Explain the difference in columns and rows. 4.Locate specific.
Introduction to Microsoft Office Excel Office Button Quick Access Toolbar Ribbon Formula Bar Alphabetical Columns Numbered Rows Worksheet Tabs.
Chapter 1 Computing Tools Data Representation, Accuracy and Precision Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Maths for Computer Graphics
Review of Matrix Algebra
EGR 105 Foundations of Engineering I Session 3 Excel – Basics through Graphing Fall 2008.
1 Excel Lesson 3 Using Formulas and Functions Microsoft Office 2010 Fundamentals Story / Walls.
Excel Web App By: Ms. Fatima Shannag.
Matrix Definition A Matrix is an ordered set of numbers, variables or parameters. An example of a matrix can be represented by: The matrix is an ordered.
1 Chapter 3 Matrix Algebra with MATLAB Basic matrix definitions and operations were covered in Chapter 2. We will now consider how these operations are.
Introduction to MATLAB ENGR 1187 MATLAB 1. Programming In The Real World Programming is a powerful tool for solving problems in every day industry settings.
Excel 2007 Part (2) Dr. Susan Al Naqshbandi
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.
Computer Science 1000 Spreadsheets II Permission to redistribute these slides is strictly prohibited without permission.
Computer Literacy BASICS
DAY 6: EXCEL CHAPTER 2 Tazin Afrin September 05,
MATLAB INTRO CONTROL LAB1  The Environment  The command prompt Getting Help : e.g help sin, lookfor cos Variables Vectors, Matrices, and Linear Algebra.
Microsoft Excel Diane M. Coyle Spring 2009 CS 105.
Excel Tutorial Enfield High School 2007.
European Computer Driving Licence Syllabus version 5.0 Module 4 – Spreadsheets Chapter 22 – Functions Pass ECDL5 for Office 2007 Module 4 Spreadsheets.
Spreadsheet A spreadsheet is the computer equivalent of a paper ledger sheet. It consists of a grid made from columns and rows. It is an environment that.
Excel Spreadsheet basics. Excel Sheets and Books  Spreadsheet: tool to analyze, chart and manage data for personal, business and financial use Worksheet:
Introduction to Engineering MATLAB – 1 Introduction to MATLAB Agenda Introduction Arithmetic Operations MATLAB Windows Command Window Defining Variables.
4.4 Identify and Inverse Matrices Algebra 2. Learning Target I can find and use inverse matrix.
Working with Arrays in MATLAB
A string is an array of characters Strings have many uses in MATLAB Display text output Specify formatting for plots Input arguments for some functions.
Excel Web App By: Ms. Fatima Shannag.
Lesson 1 – Microsoft Excel * The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
PH24010 Data Handling and Statistics Use of MathCAD to handle statistical data Data storage in vectors and matrices MathCAD’s built-in functions: –Mean,
>> x = [ ]; y = 2*x y = Arrays x and y are one dimensional arrays called vectors. In MATLAB all variables are arrays. They allow functions.
Structured Programming I – Relational & Logical Operators Objectives: By the end of this class you should be able to: Change graph interactively in EXCEL.
Introduction to Spreadsheets Part 1 The ‘Quick’ and ‘Easy’ guide to using Microsoft Excel.
Excel 2007 Part (3) Dr. Susan Al Naqshbandi
PERFORMING CALCULATIONS Microsoft Excel. Excel Formulas A formula is a set of mathematical instructions that can be used in Excel to perform calculations.
Overview Excel is a spreadsheet, a grid made from columns and rows. It is a software program that can make number manipulation easy and somewhat painless.
Mathcad – what is it A fancy calculator A problem solving tool A unit converter An equation writer We will explore pieces of all of these.
INTRODUCTION TO MATLAB DAVID COOPER SUMMER Course Layout SundayMondayTuesdayWednesdayThursdayFridaySaturday 67 Intro 89 Scripts 1011 Work
1 Excel Lesson 2 Organizing the Worksheet & Formulas Microsoft Office 2010 Introductory Pasewark & Pasewark.
Introduction to MATLAB 1.Basic functions 2.Vectors, matrices, and arithmetic 3.Flow Constructs (Loops, If, etc) 4.Create M-files 5.Plotting.
PH15720 Laboratory Techniques - An Introduction to MATHCAD.
Understanding Microsoft Excel Lesson 1 – Microsoft Excel 2013.
1 An Introduction to R © 2009 Dan Nettleton. 2 Preliminaries Throughout these slides, red text indicates text that is typed at the R prompt or text that.
1 Faculty Name Prof. A. A. Saati. 2 MATLAB Fundamentals 3 1.Reading home works ( Applied Numerical Methods )  CHAPTER 2: MATLAB Fundamentals (p.24)
PH15010 Laboratory Techniques - An Introduction to MATHCAD.
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
An electronic document that stores various types of data.
Introduction to Excel EC 151 Principles of Microeconomics Block 3,
Chapter 1 Computing Tools Variables, Scalars, and Arrays Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
LEQ: WHAT IS THE PROCESS USED TO MULTIPLY MATRICES? Matrix Multiplication Sec. 4-3.
A rectangular array of numeric or algebraic quantities subject to mathematical operations. The regular formation of elements into columns and rows.
Understanding Microsoft Excel
Understanding Microsoft Excel
Understanding Microsoft Excel
13.4 Product of Two Matrices
Matrices Rules & Operations.
Understanding Microsoft Excel
Lesson 4 Using Basic Formulas
Understanding Microsoft Excel
Matrices and Determinants
Presentation transcript:

Mathcad Variable Names A string of characters (including numbers and some “special” characters (e.g. #, %, _, and a few more) Cannot start with a number Capitalization & spelling count!!! A1 is different from a1 Be careful not to conflict with predefined name (e.g. g = acceleration due to gravity, m = meter, etc. -- which we will discuss later) Be careful that variables and functions have different names

Subscripts The “.” (period) starts a text subscript, which really is part of the variable name A 1 is different from A1 The “[“ indicates an array subscript. Thus A 1 indicates an element in the array A (it is the second element, as array subscripts start with 0 by default in Mathcad)

Functions Similar to Excel function Have a name with argument list in ( ) Return a value ( or set of values)

Common math functions implemented as functions or predefined symbols (from the calculator tool pad: Square Root:  Or \ Absolute Value: | | (put expression in edit box, hit | key) Powers of “ e “ : e

Most available as function with a standard math name: log ln sin cos exp abs

Other somewhat useful functions: If ( test expression, true result, false result) Health (Temp) = if ( Temp>98, “Fever”, “No Fever”) Health(100) = “Fever” String functions --- to find length, take substrings, search, concatenate + others.

And, as you might expect, we can write our own. We will look at writing simple functions that can be expressed as a single mathematical expression Example: Function to compute volume of an ideal gas as a function of the gas constant (R), temperature (T), pressure ( P), and moles (n)

First, define the function as you would assign a value to a variable ( use the := sign ) Vol(P,n,R,T) := n*R*T/P Use it like any other function: Volume := Vol(100,1, ,273.15)

Functions can take and use units: Vol ( 1 atm, 2 mol, L*atm/(mol*K), 500K) = L But as with all use of units in Mathcad, must be consistent. If evaluation results in incorrect unit operations, will get an error message ( the variable or whatever in red )

Functions Functions “know about” variable values defined to the left and above its definition and those values will be used when the function is used. A:= 3 Y(x) = A*3 Y(2)=6 A:=10 Y(2) = 6

Functions Functions can have other functions in them, providing they have been previously defined. Y(x) := x 2 A(y, x):= y 2 +Y(x) A(2, 3) = 13Y13

Arrays, Vectors, & Matrices Range Variables Brief Introduction to Plots

Arrays Ordered set of numbers Vector Single Row Or Column Matrix Two or More Rows and / or Columns

Arrays Access elements with array subscript “ [ “ Maximum of two dimensions Define with ctrl-m or matrix tool button First element has index of [0] or [0,0] (can change with the ORIGIN keyword)

Basic Operations Scalar add & multiply -- affects Each element in the array Determinant & Inverse -- square matrix only -- short cut key strokes ( | | & ^ -1 ) Add, subtract, multiply with usual matrix rules on size & shape -- standard math operators (+, -, *)

Resize Operations Add / Delete Rows Add / Delete Columns Add / Delete Rows & Columns Put array (or element) in edit box, type ctrl-m

Vectorize Operation This is a non-standard matrix operation in which the indicated operation is performed element by element

Vectorized Standard Multiply Useful, but be careful!

Range Variable A special type of Mathcad variable Takes on the indicated range of values when found in the worksheet

Range Variable Var := First, Second; Upper Limit ( the ; shows as … ) J := 1,3;10 J takes on values 1, 3, 5, 7 & 9 each time it is in found in the worksheet (following usual worksheet evaluation – To right or anywhere below)

Define and fill a matrix in 4 steps:

Arrays can have units, but each element must have the same dimensions

Range variable not limited to integers:

Range variable can have units:

Plots As in Excel, many type of plots. We will look at the x-y plot

From the menu: Insert / Graph / X-Y plot Add X vector in the box on the x axis Add Y vector in the box on the y axis Can add multiple x – y vector pairs. Works in internal units – no units on plot

Insert / Graph / X-Y Plot Click on plot, then right click to get format menu

Plots If would like specific units for a plot, need to convert the data before or during plotting. Say wanted previous plot in ft & ft^2

As with Excel, plot not complete until has title and axis labels

To add axis labels & titles, select plot then right click. Choose “Labels” and add as desired To get rid of Mathcad’s variables, choose “Trace” and check “Hide Arguments”