Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To be done in fortran please. ME021 Engineering Computing -Spring 2018 Assignment Fortran Project Due the week of Mar S, last lab session Least Squares

image text in transcribed
To be done in fortran please.
ME021 Engineering Computing -Spring 2018 Assignment Fortran Project Due the week of Mar S, last lab session Least Squares Line Fit When given a set of data that looks like a line, engineers often want to find the ymx+b line that best fits the data. In other words, when given a list of x values and a list of corresponding yvalues, we want to find the slope m and intercept b of the line that comes closest to the x and y data points This is actually a straightforward process via the method of least squares", based on minimizing the error between the actual data points and the line one gets using certain values of m and b. We will not cover the derivation here, but the results we will use are below . Assume that each of our x values is called x and each of our y values is called y, so that a single data point is (x, y). Igoes from 1 to n, which is the number of data points we have. We define average x and y values: Zo yi Then we find the best-fit slope to be Tavg and the best-fit intercept to be Project Overview: Our project will be to get a file name from the user, read x and y data from file, display the data at th console, allow the user to remove points from the data, then find the best-fit slope and intercept and send them to the console. In more detall, the project program you write will do the following Prompt the user for a file name, which will be stored in a string variable. Use the ADVANCE-"no" in the write statement for the prompt to get the prompt and the user's response on the same line. . Read the x and y data from the file and store it in two dynamic, double-precision real arrays. This will require counting the lines in the file to see how many data lines there are and then allocating

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 1 Lnai 6321

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215879X, 978-3642158797

Students also viewed these Databases questions

Question

Explain the steps involved in training programmes.

Answered: 1 week ago

Question

What are the need and importance of training ?

Answered: 1 week ago

Question

What is job rotation ?

Answered: 1 week ago