subject
Engineering, 28.05.2021 17:10 kidyugey

A 1D signal of up to 20,000 samples is considered. Using data structures specific to simple chained lists, determine the number of zero passes of the signal. The signal goes through 0 if it changes its sign from one sample to another. 0 is not considered a sign change.
The use of STL is prohibited. Any data structure in the STL or function in the STL used will lead to a 0-point solution.
The use of vectors is prohibited. Any static (T V [N]) or dynamic (T * V = new T [N]) vector structure used will lead to the 0 score of the solution.
Input data:
N number of samples signal samples
Output data:
the number of passes through zero
Example:
Input data:
10
1 3 -2 -6 4 10 1 -5 4 1 Output data:
4
Explanation:
There are 4 sign changes between two consecutive samples:
3 -2 -> sign change (first zero crossing)
-6 4 -> sign change (second zero crossing)

1 -5 -> sign change (third zero crossing)
-5 4 -> sign change (fourth zero crossing)

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 16:10
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
question
Engineering, 04.07.2019 18:10
Apump is used to circulate hot water in a home heating system. water enters the well-insulated pump operating at steady state at a rate of 0.42 gal/min. the inlet pressure and temperature are 14.7 lbf/in.2, and 180°f, respectively; at the exit the pressure is 60 lbf/in.2 the pump requires 1/15 hp of power input. water can be modeled as an incompressible substance with constant density of 60.58 lb/ft3 and constant specific heat of 1 btu/lb or. neglecting kinetic and potential energy effects, determine the temperature change, in °r, as the water flows through the pump.
Answers: 1
question
Engineering, 04.07.2019 18:10
Air is to be cooled in the evaporator section of a refrigerator by passing it over a bank of 0.8-cm-outer-diameter and 0.4-m-long tubes inside which the refrigerant is evaporating at -20°c. air approaches the tube bank in the normal direction at 0°c and 1 atm with a mean velocity of 4 m/s. the tubes are arranged in-line with longitudinal and transverse pitches of sl- st 1.5 cm. there are 30 rows in the flow direction with 15 tubes in each row. determine (a) the refrigeration capacity of this system and (b) pressure drop across the tube bank. evaluate the air properties at an assumed mean temperature of -5°c and 1 atm. is this a good assumption?
Answers: 1
question
Engineering, 04.07.2019 18:10
For the closed feedwater heater below, feedwater enters state 3 at a pressure of 2000 psia and temperature of 420 °f at a rate of ix10 ibhr. the feedwat extracted steam enters state 1 at a pressure of 1000 psia and enthalpy of 1500 btu/lbm. the extracted er leaves at an enthalpy of 528.7 btu/lbm steam leaves as a saturated liquid. (16) a) determine the mass flow rate of the extraction steam used to heat the feedwater (10) b) determine the terminal temperature difference of the closed feedwater heater
Answers: 3
You know the right answer?
A 1D signal of up to 20,000 samples is considered. Using data structures specific to simple chained...
Questions
question
Mathematics, 06.10.2019 07:30
Questions on the website: 13722360