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
Find the minimum film thickness for a journal bearing with the data below. shaft diameter, d-50 mm, clearance ratio, cdratio? 0.001, shaft speed, n 2000 rpm; bearing length. i 200 mm; eccentricity ration, ? -0.55. ( note, cdratio-ca/d) the minimum film thickness is um
Answers: 2
question
Engineering, 04.07.2019 18:20
Prove the equivalence between the two statements of the 2nd law of thermodynamics (i.e., a violation of one statement leads to the violatio the other statement)
Answers: 2
question
Engineering, 04.07.2019 19:10
Asteel wire of 2 mm diameter is fixed between two points located 2 m apart. the tensile force in the wire is 250n, if its density of steel is given by 7830 kg/m3 the fundamental frequency of vibration hz? ?
Answers: 3
question
Engineering, 04.07.2019 19:10
For a process taking place in a closed system containing gas, the volume and pressure relationship is pvi-constant. -1.5 bar, the process starts with initial conditions, pi = =0.03 m3 and ends with final volume, v2-0.05 m3 determine the work done by the gas.
Answers: 2
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, 17.10.2019 12:50
question
Mathematics, 17.10.2019 12:50
question
Mathematics, 17.10.2019 12:50
Questions on the website: 13722362