Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer the following questions by submitting your answers to Autolab via the A0 Programming assign- ment. Submit your solution in a single .cpp file. Expect

image text in transcribedimage text in transcribed

Answer the following questions by submitting your answers to Autolab via the "A0 Programming" assign- ment. Submit your solution in a single .cpp file. Expect this section to take 6-10 hours of setting up your environment, reading through documen- tation, and planning, coding, and testing your solution. Problem 8. (80 points) A time series is a sequence of measurements taken at regular successive intervals For example, the sequences and (5,10888), (10, 10949), (15,10967), (20, 10900), (25, 10821), (30, 10956) are both time series where each pair has the form (time,value), which represents the time a measurement was taken and the value taken at that time. The first series begins at time 0 and ends at time 4 and the second series begins at time 5 and ends at time 30, so the time series need not begin or end at any particular time value. Also notice that the first sequence is measured every 1 time units while the second is measured every 5 time units Your task is to read in a data file named data.csv containing a possibly incomplete time series and fill in the gaps by linearly interpolating the values. The updated series should be written to a file named data-updated.csv (the filenames should be hardcoded). Linear interpolation is done by computing a line between the two points at a gap and evaluating the e formula at the missing points -Given two points (t1, v1) and (t2,, the slope is Tn-(V2-V1)/(#2-t1) The line formula is y-mx +b, so you must solve for b The format of the data will be a non-empty comma separated file containing pairs of unsigned 64-bit integers corresponding to the time series, with one pair per line A gap occurs when two adjacent measurements differ by more than the smallest gap found within the entire sequence. Consider the following example

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

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions

Question

. What, if any, conflicts arose within your small group? c u m \ t

Answered: 1 week ago