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 is torsional constant of hair spring connected to coil

i. The sender sends frames with increasing sequence numbers to the receiver. Only frames received in correct order are accepted by the receiver. ii. The receiver sends a NAK back to the sender when it receives an out-of-sequence frame.

  Determine the total power supplied by the source

The total power delivered to a balanced, Y-connected, three-phase load is 720 kW at a lagging power factor of 0.8. The line voltage at the load is 3463 V. The impedance of the transmission line is 2.5 + j10.2 ohm. a) Determine the line voltage at ..

  Determine what is the range of decimal numbers

What is the range of decimal numbers that can be represented in 16-bit register assuming the following (a) Numbers are unsigned (b) Numbers are signed (in signed-magnitude representation)

  What is the current flowing through the galvanometer

Refer to the Wheatstone Bridge diagram. If R1=1ohm, R2=111ohm, Runknown= 1ohm, R3 is set at 1Kohm, and the battery is 9V:What is the current flowing through the galvanometerohm Use 60ohm for the internal galvanometer resistance in calculations.

  What is the magnitude of the impedance at an frequency

A parallel-resonant RLC circuit has R = 75 I, L=50mh, and C=45pF. A) Sketch and label the circuit. B) Find fo, the resonant frequency. C) At what frequency is impedance a maximum D) What is the magnitude of the impedance at this frequency

  Design a circuit that might be used as a trigger

Design a circuit that might be used as a trigger for a night-light. You are given a photoresistor whose resistance changes from 5k when inside a lighted room to 30k in a dark room. Design a voltage divider circuit that will provide a 3V

  Explain choice in terms of current offset at summing point

In order to control the slope of a ramp produced by an integrator, the values of Vin, R, and C may be varied. Assuming a fixed value for C of 10 μF, would it be better to have a relative large Vin with a correspondingly large value of R

  Obtain input value from two switches on the logic designer

Design a circuit that, given a 2-bit value, will light a LED corresponding to that value. One of four LEDs should be lit for each of the four possible input values (binary 0 through 3).

  What is the theoretical barrier height of semiconductor

Consider two Si samples; one is p-type doped to 1018/cm3 acceptor atoms and the other one n-type doped to 1015/cm3 donor atoms at room temperature (300K). a. Draw the band diagram associated with p-type and n-type semiconductors, noting the various..

  How many ways are there to draw 3 resistors from a box

Calculate the probability of drawing 3 10 k resistors from a box of 500 resistors, where 495 are 100 k resistors and 5 are 10 k . Use your results from part (a) and (e) to find this probability. How many ways are there to draw 3 resistors from a bo..

  What should gain of transmitting and receiving antenna be

To meet the signal-to-noise ratio of the receiver, the received power must be at least 10 µ W. Assuming the two antennas are aligned for maximum reception to each other, including being polarization matched, what should the gain (in dB) of the tra..

  Find generated emf ea and the torque applied

A 50 kw, 120 - V shunt generator has Ra = 0.09 ohm, Rfw = 30 ohm and external field resistor Rfx = 15 ohm. The generator delivering the rated load at terminal voltage. a. find generated emf Ea

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