Download presentation
Presentation is loading. Please wait.
Published byShana Beasley Modified over 9 years ago
1
PH15720 Laboratory Techniques - An Introduction to MATHCAD
2
Simple X-Y plots ‘Quickplot’‘Quickplot’ Plot functions with 1 parameterPlot functions with 1 parameter Use with built-in & user definedUse with built-in & user defined Insert|Graph|X-Y plotInsert|Graph|X-Y plot
3
Simple X-Y Plot #1
4
Simple X-Y Plot #2
5
Plot Formatting Double click in graphDouble click in graph Format|Graph|X-Y Plot…Format|Graph|X-Y Plot… Dialog boxDialog box –Gridlines, Numbered Axes, Log Scales –Traces: Colour, Points, Lines &c –Axis titles, legend –Defaults
6
Doing More with Plots #1 Add more curves to y-axisAdd more curves to y-axis Fix scale on x- & y-axisFix scale on x- & y-axis Add markers on x- & y-axis - from dialog boxAdd markers on x- & y-axis - from dialog box
7
Scaling plot axes
8
Doing More with Plots #2
9
Plot Example Sine approximation Axis limits Format Plot Gridlines
10
Dealing with Experimental Data 5 stage process5 stage process –Get data into MathCAD –Process data (scale, units etc) –Plot Data –Fit curve (line) to data –Compare theory with experiment
11
Matrices, Vectors and Arrays Way of storing related dataWay of storing related data –Experimental Results –Coefficients InterpolationInterpolation PolynomialPolynomial –Solutions to DEs –3D position/velocity/force Single Name – Many valuesSingle Name – Many values
12
Arrays, Vectors & Matrices - Terminology Vector – 1-dimensionalVector – 1-dimensional Matrix – 2-dimensionalMatrix – 2-dimensional Array – general term, covers bothArray – general term, covers both
13
Getting Data into MathCAD Put data in matrixPut data in matrix –1 column per measurement –1 row per data point Use Input TableUse Input Table – Insert|Data|Table Table re-sizes & scrolls as neededTable re-sizes & scrolls as needed
14
Data Input Example Resistor ExperimentResistor Experiment Apply voltage, measure CurrentApply voltage, measure Current Voltage 1 row per reading pair Current (mA)
15
Process Experimental Data #1 Extract columns with column operator M <>Extract columns with column operator M <> –Insert into worksheet from Matrix toolbarMatrix toolbar -6 -6 –Fill in column number to extract –Numbering starts at 0
16
Process Experimental Data #2 Input table as before Extract Voltage to vector & apply units Same for current
17
Check on extracted vectors Single columnSingle column Converted to base unitsConverted to base units Scroll bars if neededScroll bars if needed
18
Plotting data X-Y Plot can plot 1 vector against another, if both vectors have same number of elementsX-Y Plot can plot 1 vector against another, if both vectors have same number of elements Use plot formatting to change to single pointsUse plot formatting to change to single points
19
Plotting data Example
20
Fit curve/line to data Only simple straight line fits for nowOnly simple straight line fits for now –slope(Vx,Vy) –intercept(Vx,Vy) Details in help systemDetails in help system Units carry through calculationUnits carry through calculation Sometimes need 1/slopeSometimes need 1/slope
21
Slope calculation -Resistor Example
22
Compare theory to experiment Create functionCreate function Plot on same graph as experimental dataPlot on same graph as experimental data Use multiple variables on x- and y- axesUse multiple variables on x- and y- axes Separate items on axes with commasSeparate items on axes with commas
23
Compare theory to experiment Function gives theoretical current Test function at a couple of points
24
Plot theory & data Multiple items on x- & y-axes ‘vv’ exists only to make the plot Scale x-axis to suit
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.