How to calculate the derivative of the input data

Assignment Help Electrical Engineering
Reference no: EM13273817

Write a C program that reads in the Y values of a function provided in data.txt. The Y values correspond to an X domain ranging from -3 to 6 with a step size of 0.01. The program must use a function that performs the numerical differentiation method described below to calculate the derivative of the input data and write the resulting X and Y values to a CSV file. Corresponding X and Y values must be separated by a comma and subsequent data points must be separated by new lines.
m=Δf(x)/Δx=[f(x+h)-f(x)]/h
In our case the size of h is our step size and if we perform this calculation between each data point we will get the derivative of the function.
• A function must be used to calculate the derivative between 2 values, it must accept the 2 Y values currently being evaluated and return the derivative at that point.
• When a file is opened it must be confirmed that the file was opened correctly.
• The lower and upper bound values and step size must be defined as constants
Next the produced CSV file must be imported into Microsoft Excel and the X and Y data must be plotted in a chart. The axes must be labelled appropriately and the chart must be given a title. Once the data is plotted a trendline of the appropriate type must be fitted to the data.
Finally you must calculate the variance of the Y values imported into Excel without using the built in variance function. You may only use the built in SUM and AVERAGE functions. Variance is defined in the equation below:
σ2=(Σ(X-μ)2)/N

Where σ2 is the variance, X is the actual data, μ is the average of all the data and N is the total number of data elements. You will make a cell that contains the average of all the Y values. Then for each Y value a formula must produce a cell that contains the value of (X- μ)2 where X is the individual data elements and then you must average all of the resulting values.

Reference no: EM13273817

Questions Cloud

What do patients expect from medical treatment : What do patients expect from medical treatment, what leads people to seek treatment and how does a patient decide where to go for treatment?
What is the change of its electric potential : A particle of mass 1.00× 10?3 kg and charge ?1.00 ?C is released from rest near the ground in a constant, horizontal electric field of strength 5.00 kV/m. What is the change of its electric potential
Determine the maximum power that transistor can dissipate : A certain power transistor is packaged in a TO-220 case having a thermal resistance, RJC = 3°C/W. The device will be mounted using a mica insulator and silicone grease (RCS = 1°C/W) onto a heat sink having RSA = 6°C/W.
How many shares will remain after the repurchase : how many shares will remain after the repurchase round nearest whole number shares?
How to calculate the derivative of the input data : The Y values correspond to an X domain ranging from -3 to 6 with a step size of 0.01. The program must use a function that performs the numerical differentiation method described below to calculate the derivative of the input data and write the re..
Analyze how your prior understanding about this religion : Discuss any misconceptions you had about the religion you researched and analyze how your prior understanding about this religion was altered (if at all) through your encounter.
Determine the mass of the rope : Andy (mass 77kg ) uses a 2.7m -long rope to pull Bob (mass 61kg ) across the floor (μk=0.20) at a constant speed of 1.0m/s. What is the mass of the rope
Explain chemically resistant polymer is printed on the board : In the production of printed circuit boards for the electronics industry, a 0.235 mm layer of copper is laminated onto an insulating plastic board. Next a circuit pattern made of a chemically resistant polymer is printed on the board
Should it replace the old steamer : To support the greater sales, the new machine would require that inventories increase by $2,900, but accounts payable would simultaneously increase by $700. Walter's marginal federal-plus-state tax rate is 40%, and its WACC is 13%. Should it repla..

Reviews

Write a Review

Electrical Engineering Questions & Answers

  What range of frequencies can we use the capacitor for

1) Plot the impedance with respect fo frequency from 1Hz to 10MHz 2) Capacitor must be less than .1 of a 480 ohm resistor to be a good bypass capacitor for that resistor. What range of frequencies can we use this capacitor for

  What is the theoretical highest bit rate transmission

Explain the term 'multiplexing' in general and describe why it is particularly important in the transmission of PAM signals and describe the main factors upon which the maximum data rate over a channel depends.

  What is the output power of the system using a motor powered

A student lifts a weight (W) using a motor powered by solar cells to determine the efficiency of the solar cell/motor system. On the power meter the voltage reads V and the current reads I. The student lifts the weight a distance H in a time T.

  Find total dissipated power if 3 resistors identical to r0

he power dissipated in the resistor R0 is 24 W when connected to a 10V source. Find the total dissipated power if 3 resistors identical to R0 are connected in series to a 10V source.

  Design the sign extension component of an i-format data

design the sign extension component of an I-Format Data Path Unit, where a 16 bit number will be extended to a 32-bit number, while mainintaing the sign (signed numbers use 2s complement).

  Find the average power dissipated in the soldering iron

The heating element in a soldering iron has a resistance of 30-ohm. Find the average power dissipated in the soldering iron if it is connected to a voltage source of 117 V rms.

  What is the speed of light in the two materials

An incident wave of light travels through glass (n = 1.4) to water (n = 1.33) at an angle of 350. a. What is the angle of reflection and refraction b. What is the critical angle for this system

  Design a three mode pid controller

A liquid level system converts a 4-10 m level into a 4-20mA current. Design a three mode controller (PID im assuming) that outputs 0-5 volts with 50% PB, 0.03 min integration time, and 0.05 min derivative time. Fastest expected change time is 0.8 ..

  How to change the calculated molarity of the naoh solution

one group of students made an error by using HCLinstead of H2SO4 to titrate an unknown solution of NaOH. Would this error change the calculated molarity of the NaOH solution.

  What c standard library header file must be included

A function must be defined or declared above the locations in the source code file from where it is called. We declare a function by writing a function declaration (which is a statement so it ends with a semicolon). Another term for function decla..

  Does current enter fo leave positive terminal of inductor

Teh energy stored in a 2H inductor os 130 J and is increasing at 200 J/s at t=4s. A) Determine the current magnitude at t=4s. B) Determine the voltage magnitude at t=4s.

  What are the limits that the actual value will fall under

an analog ammeter and the faceplate states an accuracy of +/- 1.5% of full scale value. if we take a measurement on the 10A scale and we measure 1.8A, what are the limits that the actual value will fall under.

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