Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
PH15720 Laboratory Techniques An Introduction to MATHCAD Introduction • Review of Last Week • Dealing with experimental Data Review of Last Week’s Exercise • IF YOU DON’T UNDERSTAND – ASK!!! • Explain your work • Read the question • Don’t use single character names • Don’t redefine dimensions (m,s) Translating Equations • Equations in physics given in general form • Need to translate for specific problem Translating Equations #2 Textbook MathCAD F ma FHook mPendulum g Translating Equations #3 Textbook KE m v 1 2 2 1 2 MathCAD KEcar mCar vCar 2 Dealing with Experimental Data • 5 stage process – Get data into MathCAD – Process data (scale, units etc) – Plot Data – Fit curve (line) to data – Compare theory with experiment Matrices, Vectors and Arrays • Way of storing related data – Experimental Results – Coefficients • Interpolation • Polynomial – Solutions to DEs – 3D position/velocity/force • Single Name – Many values Arrays, Vectors & Matrices Terminology • Vector – 1-dimensional • Matrix – 2-dimensional • Array – general term, covers both Getting Data into MathCAD • Put data in matrix – 1 column per measurement – 1 row per data point • Use Input Table – Insert|Data|Table • Table re-sizes & scrolls as needed Data Input Example • Resistor Experiment • Apply voltage, measure Current Voltage Current (mA) Readings 0 0 1 2 3 4 5 6 1 0 1 2 3 4 0 1.23 2.45 3.7 4.92 1 row per reading pair Process Experimental Data #1 • Extract columns with column operator M<> – Insert into worksheet from • Matrix toolbar • <ctrl>-6 – Fill in column number to extract – Numbering starts at 0 Process Experimental Data #2 Readings 0 0 1 2 3 4 1 0 1 2 3 4 0 VApplied Readings V 1 IMeas ured Readings mA 0 1.23 2.45 3.7 4.92 Input table as before Extract Voltage to vector & apply units Same for current Check on extracted vectors • Single column • Converted to base units • Scroll bars if needed 0 1 VApplied 2 V 0 1.23 10 3 IMeas ured 2.45 10 3 3 3.7 10 4 4.92 10 3 3 A Plotting data • X-Y Plot can plot 1 vector against another, if both vectors have same number of elements • Use plot formatting to change to single points Plotting data Example 3 4.92 10 0.006 0.004 IMeasured 0.002 0 0 0 0 1 2 VApplied 3 4 4 Fit curve/line to data • Only simple straight line fits for now – slope(Vx,Vy) – intercept(Vx,Vy) • Details in help system • Units carry through calculation • Sometimes need 1/slope Slope calculation -Resistor Example RMeas ured 1 s lope( VApplied IMeas ured) RMeas ured 812.348 Compare theory to experiment • • • • Create function Plot on same graph as experimental data Use multiple variables on x- and y- axes Separate items on axes with commas Compare theory to experiment ITheory( vv) • Function gives theoretical current vv RMeas ured ITheory( 1 V) 1.231 mA ITheory( 2 V) 2.462 10 3 • Test function at a couple of points A Plot theory & data 3 6.15510 Multiple items on x& y-axes 0.006 IMeasured ITheory ( vv ) ‘vv’ exists only to make the plot 0.008 0.004 0.002 0 0 0 0 Scale x-axis to suit 1 2 3 VApplied vv 4 5 5