Write a c function called bspline

Assignment Help C/C++ Programming
Reference no: EM13707311

Question: Please solve. We use C and visual studio

Part (a) Write a C function called Bspline that takes as input a single double precision argument called x. The function returns a double precision value y determined as given

if -2 <=x<0 then y=(1/4)(x+2)^3

if -1 <=x<0 then y=(1/4)+(3/4)(x+1)+(3/4)(x+1)^2 -(3/4)(x+1)^3

if 0 <=x<1 then y=(1/4)+(3/4)(x-1)+(3/4)(1-x)^2 -(3/4)(1-x)^3

if 1 <=x<=2 then y=(1/4)(2-3)^3

For all other input values, the function returns 0.0.

You have to provide a table of test results for 30 values of x, uniformly spaced between -2.25 and 2.25 inclusive

Part (b) Write a C function called shiftBspline that uses the function Bspline of Problem (a). This function takes a double precision argument called shift, and a double presision argument called x.

The function returns the value at location x of the Bspline function with its centre x-value shifted to the location shift.

Provide a table of 20 values of the shifted Bspline with the value of 10 for shift, and the table values uniformly spaced between shift -3.0 and shift +3.0. 

You need to write a function to shiftBspline and Bspline. Can someone please help me. I don't know what to do to write this C program and visual studio.

Reference no: EM13707311

Questions Cloud

How many bytes wide should each write buffer entry : What speedup could be expected in the steady state by using a merging write buffer instead of a non-merging buffer when zeroing memory by the execution of 64 bit stores if all other instructions could be issued in parallel with the stores and the ..
External gates to realize the function : Use a 4-to-1 multiplexer and a minimum number of external gates to realize the function - The inputs are only available uncomplemented.
Indexed addressing to reverse the elements : Use a loop with indirect or indexed addressing to reverse the elements of the integer array in place - Can you implement a program to indexed addressing to reverse the elements of an array?
Explain about the data warehouses and relational databases : Can you explain about the Data Warehouses and relational databases?
Write a c function called bspline : Write a C function called Bspline that takes as input a single double precision argument called x. The function returns a double precision value y determined as given
Implement the link list using java programming concepts : Modify the class LinkedList by adding to it the following methods. The appropriate error message should be generated if an invalid condition occurs.
Create a structure named dog with a string field : Create a Structure named dog with a string field for the Dog's name. Create a Structure named Cat with a string field for the Cat's name.
Prepare an overloaded constructor : Prepare an overloaded constructor that provides values for each field. Also provide get methods for each field. Save the file as Patient.java.
Establish shared-memory object between parent and child : the child process must output the sequence of numbers generated from the algorithm specified by the Collatz conjecture because the parent and child have their own copies of the data.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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