How does the interpolated function look compared

Assignment Help MATLAB Programming
Reference no: EM132390380

Interpolation

For this task, you will perform a cubic spline interpolation on the data provided in the file in_interp . csv. First, plot the data (using MATLAB or Excel) in order to get an idea of the behaviour f(x) should have.

Next, write C code that uses cubic splines in order to estimate the function f(x) that cuts through the data. You will then use your code to calculate the value(s) of f(x) at xo = 4, where xo is to be input at runtime from stdout. You will implement your method in int erp 0, reading the values of x and f(x) from the file in_interp . csv and outputting the values of the interpolated value to out_interp . csv in the following format (up to 6 decimal places).

xo,f(xo)

4.000000,0.234655

4.000000,1.107865

The output provided above is an example and does not constitute the solution. There may be more than 1 solution possible here and you must be able to identify the correct interval(s) to compute the interpolated value. For the C implementation, you must dynamically allocate space for x, f (x) and write your code such that it can work for a different set of input data and different xo. Finally, you must plot the interpolated function using either MATLAB or Excel. How does the interpolated function look compared with the actual datapoints?

Attachment:- Data File.rar

Reference no: EM132390380

Questions Cloud

Data Centre Consultancy Project Assignment : Assignment - Data Centre Consultancy Project - Submit a report to the Head of IT & the Board of Deans which highlights your findings for their data centre
Outline the components that can contribute to an effective : Certain teams excel beyond performance expectations and others barely meet their obligations. Outline the components that can contribute to an effective work
MHW-642 Families in Contemporary Society Question : MHW-642 Families in Contemporary Society assignment help and assessment help, Grand Canyon University - Explain the impact of feminism, patriarchy/gender roles)
How do you know whether your work is meeting : How do you know whether your work is meeting the work standards expected by your organisation?
How does the interpolated function look compared : You must plot the interpolated function using either MATLAB or Excel. How does the interpolated function look compared with the actual datapoints?
PSY 1700 Introduction to Psychology Assignment Problem : PSY 1700 Introduction to Psychology assignment help and solutions, Indiana Institute of Technology, assessment help - According to scientists; our personality.
Represent the economic conditions that the company faces : Choose a company from the Company Revenue excel file in Doc Sharing and then choose two macroeconomic variables for Macro Data file in Doc Sharing.
MBA6140 Strategic Leadership Plan Assignment : MBA6140 Strategic Leadership and Stakeholder Management Assignment - Strategic Leadership Plan, Assessment Help and Solution - Edith Cowan University, Australia
In haiti prostitutes are ilegal and penalized by law : What recommendations/strategies (short or long run) would you give to Oxfam with the goal of reducing the chances of what happened in Haiti?

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd