pascal developing - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# pascal developing

Posts: 3Member
I want to develop a program
which reads values and finds triplets in a signal is a triplet signal values ??with following properties: (a) the two extreme values ??are equidistant from the middle value, and (b) the two extreme values ??are equal and less than half the median price. The median value of a triplet gives the characteristic frequency equal to the median position in the signal.
Thanks for you help.

• Posts: 35Member
: I want to develop a program
: which reads values and finds triplets in a signal is a triplet
: signal values ??with following properties: (a) the two extreme
: values ??are equidistant from the middle value, and (b) the two
: extreme values ??are equal and less than half the median price. The
: median value of a triplet gives the characteristic frequency equal
: to the median position in the signal.
: Thanks for you help.
:
It is not clear what the requirement is. If the two extreme values are equal (specification b) then specification a is automatically satisfied.

Is this an electrical signal? If so then what do you mean by "price?"

Are the values real, integer or char?

Are the values sent three at a time? Or does each new value cause the oldest value to be discarded?

• Posts: 3Member
Problem:
Develop a program
which reads the values ??corresponding to a signal and
recognizes the characteristic frequencies.
A triplet in a signal is a triplet signal values ??with
following properties: (a) the two extreme values ??are equidistant from the middle
value, and (b) the two extreme values ??are equal and
less than half the median value.For example, the triplet
values ??are shown in bold below, are triplet:

The median value of a triplet gives the characteristic frequency
equal to the median position in the signal.At
example above, the frequency characteristic is 6 (because the
5 median price is the sixth number displayed in the signal).Input files:
The input files named seti.in are text files with
structure: They have exactly two lines. The first is an integer
number N (10 = N = 10.000), corresponding to the number of values
the signal we entered. The second line has N
integers separated by two to one space.
Output files:
The output files named seti.out are text files with
following structure: The first line has an integer number K
(0 = K = N). This number represents the number of charac-
teristics frequencies identified. Follow K lines
each of which has an integer M, (2 = M = N-1).
The number M is a characteristic frequency, namely
position of the middle value of the corresponding triplet in the signal (the
numbering begins with 1). The characteristic frequencies should
be given in ascending order. If a frequency characteristic
match more triplets, the frequency should be
appears only once.
or if you can help me reply
• Posts: 35Member
Your example is not showing up.

• Posts: 3Member
• Posts: 35Member