MSE 310 Solns Prob Set 0

MSE 310 Solns Prob Set 0 - MSE 310/ECE 340 Instructor: Bill...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MSE 310/ECE 340 Instructor: Bill Knowlton Problem Set 0 Fall 2011 Solutions for Problem Set 0 ü 2a. Create a data set of at least 4 sets of (x,y) data where x = electric field and y = voltage. For instance, at 0 volts, the electric field is 0 therefore we have (x=0MV/cm, y=0V) and at -13V, the electric field is -65MV/cm, therefore we have (x=-65MV/cm, y=-13V). The data set of electric field and voltage data (x=electric field, y=voltage) obtained from the Band Diagram Program is: {{0, 0}, {5, 1}, {10, 2}, {15, 3}} ü 2b. Plot the data using Mathematica. Your plot should be labeled thoroughly and your Mathematica program should be documented (i.e., add comments to describe what your code means). Initialize variables Clear DifData, DifDataplot, DifDatafit, plotDifFit, diffit Place data in list DifData  0, 0 , 5, 1 , 10, 2 , 15, 3  Create scatter plot of data DifDataplot ListPlot DifData, Frame True, GridLines Automatic, PlotStyle RGBColor 1, 0, 0 , PointSize 0.02`  , FrameLabel "Electric Field MV cm ", "Voltage V "  Perform fit and define the fitting function Print "y ", DifDatafit Fit DifData, 1, x ,x  plotDifFit Plot DifDatafit, x, 0, 15 , Frame True, GridLines Automatic, PlotStyle RGBColor 0, 1, 0  , FrameLabel "y data arb. Units ", "x data arb. Units "  Show  command to show the plots pplot and plotpfit on the same graph Show DifDataplot, plotDifFit, PlotLabel "Fit Green Line; Data Red Points" Use LinearModelFit  command that is new to Mathematica 7 diffit LinearModelFit DifData, x, x Provides the adjusted R
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/16/2011 for the course ENGINEERIN MSE 310 taught by Professor Billknowlton during the Spring '10 term at Boise State.

Page1 / 5

MSE 310 Solns Prob Set 0 - MSE 310/ECE 340 Instructor: Bill...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online