ECE 1574 Week5 Lab.pdf

ECE 1574 Week5 Lab.pdf - Week 5 Lab ECE1574 Problem Solving...

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

View Full Document Right Arrow Icon
ECE1574 – Problem Solving for Engineers With C++ Week 5 Lab Using C++, create a program to calculate a linear model of some (x,y) data pairs using least- squares linear regression. Assume that the user will enter the data points. Theory: A line is modeled with an equation in the form y = mx + b where m is the slope and b is the y-intercept. The independent and dependent variables are x and y, respectively. When plotted, the equation produces a straight line: However, experimental data are subject to various types of errors and variations in the physical system that produced the data. Consequently, experimental data will seldom plot as a perfect line. Yet it is desirable to obtain an empirical representation of the system by deriving the linear equation that is the closest fit to the experimental data, after obviously erroneous data points have been excluded. In the graph shown, the squares represent experimental data points, and the line is the closest fit linear model.
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern