subject
Engineering, 28.05.2021 17:10 edjiejwi

Help 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 18:20
Modern high speed trains do not have perpendicular expansion gaps where rails are joined end-to-end any more they are mostly welded together but what might happen if there was a spell of particularly hot weather that causes inspection of the tracks?
Answers: 1
question
Engineering, 04.07.2019 18:20
Wiy doeres rere okhn a pump whon working betwon the same pressure range?
Answers: 2
question
Engineering, 06.07.2019 03:20
Figure out the odd statement about ceramics in the following (a) good insulators of heat and electricity (b) usually less desire than metals (c) ductile in nature (d) contains both metallic and nonmetallic elements
Answers: 3
question
Engineering, 06.07.2019 04:30
At steady state, air enters an insulated duct of varying cross-sectional area (similar to a nozzle or diffuser) at 200 kpa, 52°c with a mass flow rate of 0.5 kg/s. at the duct exit, the pressure of the air is 100 kpa, the velocity is 255 m/s, and the cross-sectional area is 2 x 10-3 m^2. assuming an ideal gas model, determine: a)-find the specific volume of the air at the exit, in m3/kg. b)- the temperature of the air at the exit, in k. c)-the velocity of the air at the inlet, in m/s. d)-the inlet cross-sectional area, in m^2.
Answers: 1
You know the right answer?
Help A 1D signal of up to 20,000 samples is considered.
Using data structures specific to sim...
Questions
question
Mathematics, 29.10.2020 17:10
Questions on the website: 13722359