Problem

Linear Interpolation. The following problems refer to wind-tunnel test data available on t...

Linear Interpolation. The following problems refer to wind-tunnel test data available on the companion website. The file contains a flight-path angle (in degrees) and its corresponding coefficient of lift on each line in the file. The flight-path angles will be in ascending order.

Modify the program developed in Problem 1 such that it uses the function developed in Problem 2 to determine whether or not the data are in the desired order. If they are not in the desired order, use the function developed in Problem 3 to reorder them.

Problem 1

Linear Interpolation. The following problems refer to wind-tunnel test data available on the companion website. The file contains a flight-path angle (in degrees) and its corresponding coefficient of lift on each line in the file. The flight-path angles will be in ascending order.

Modify the program in Problem so that it prints a message to the user. The message should give the range of angles that are covered in the data file after reading the values.

Problem

Linear Interpolation. The following problems refer to wind-tunnel test data available on the companion website. The file contains a flight-path angle (in degrees) and its corresponding coefficient of lift on each line in the file. The flight-path angles will be in ascending order.

Write a program that reads the wind-tunnel test data, and then allows the user to enter a flight-path angle. If the angle is within the bounds of the data set, the program should use linear interpolation to compute the corresponding coefficient of lift. (You may need to refer to the section on linear interpolation in Section 2.5.)

Problem 2

Linear Interpolation. The following problems refer to wind-tunnel test data available on the companion website. The file contains a flight-path angle (in degrees) and its corresponding coefficient of lift on each line in the file. The flight-path angles will be in ascending order.

Write a function that could be used to verify that the flight-path angles are in ascending order. The function should return a 0 if the angles are not in order and a 1 if they are in order. Assume that the corresponding function prototype is

int ordered(double x[],int num_pts);

Problem 3

Linear Interpolation. The following problems refer to wind-tunnel test data available on the companion website. The file contains a flight-path angle (in degrees) and its corresponding coefficient of lift on each line in the file. The flight-path angles will be in ascending order.

Write a function that receives two one-dimensional arrays that correspond to the flight path angles and their coefficients of lift. The function should sort the flight-path angles into ascending order while maintaining the correspondence between the flight-path angles and their coefficients of lift. Assume that the corresponding function prototype is

void reorder(double x[],double y[],int num_pts);

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search