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 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
The mass flow rate of the fluid remains constant in all steady flow process. a)- true b)- false
Answers: 1
question
Engineering, 04.07.2019 18:10
Carbon dioxide gas expands isotherm a turbine from 1 mpa, 500 k at 200 kpa. assuming the ideal gas model and neglecting the kinetic and potential energies, determine the change in entropy, heat transfer and work for each kilogram of co2.
Answers: 2
question
Engineering, 04.07.2019 18:10
Which of the following refers to refers to how well the control system responds to sudden changes in the system. a)-transient regulation b)- distributed regulation c)-constant regulation d)-steady-state regulation
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
Questions on the website: 13722363