Quadratic interpolation of temperature, MATLAB Programming

Temperature readings were done every hour (starting at 1 P.M., but the end time could vary) and stored in a vector called readings. Write a function called halffit that receives this vector as an argument and uses a quadratic interpolation (second order) to determine what the temperature was every half hour between the actual recorded temperatures.

The function then plots, on one graph, the original temperature readings (using a ‘o' for the points), the interpolated temperatures at the half hours (using a '+' for these points), and the quadratic curve that was used for the interpolation. Put a legend on the graph to distinguish them. The number of hours that was used for the original vector may not be assumed. For example, the function might be called as follows:

2104_Quadratic Interpolation of Temperature.png

>>readings = [33, 40, 42, 41, 39, 32];
>>halffit(readings)

The Figure Window would look like the following.

Posted Date: 3/13/2013 5:25:57 AM | Location : United States







Related Discussions:- Quadratic interpolation of temperature, Assignment Help, Ask Question on Quadratic interpolation of temperature, Get Answer, Expert's Help, Quadratic interpolation of temperature Discussions

Write discussion on Quadratic interpolation of temperature
Your posts are moderated
Related Questions

Calling an User-Defined Function from Script: Now, we will change our script which prompts the user for the radius and computes the area of a circle, to call our function cal

how to model a diode in matlab given data

Write a MATLAB program that calculates the arithmetic mean, and the root-mean-square average for a given set of values. The output should be formatted as follows: Y

How can I separate a row vector into groups.

Functions which return More than one Value: Functions which return one value have one output argument. The Functions which return more than one value should rather have more t

For a statistically stationary environment it would be advantageous to use gear shifting, that is to reduce the adaptation gain with time. To illustrate this, try using a varying a


Illustration of Function functions: For illustration, to pass the sin function into fplot, one would pass its handle as shown in figure for the result.   >> fplot(@s

Write a function called threshold2 (in a file called 'threshold2.m'). The function takes an arbitrary number of input variables. The first input variable, t, is required and is the