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.
Comments
: 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?
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:
[img=http://https://mail-attachment.googleusercontent.com/attachment/?ui=2&ik=67df716543&view=att&th=13c12009dbed7447&attid=0.1&disp=inline&realattid=f_hbmreqzn0&safe=1&zw&saduie=AG9B_P_mHAVL4wJqYzw-io_Vots0&sadet=1357511722824&sads=BDxOpgDR7TRS1J-uJearKDrofbQ&sadssc=1]
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.
I think I help you to help me if you have any question reply
or if you can help me reply
: dbed7447&attid=0.1&disp=thd&realattid=f_hbmreqzn0&zw
This site asks me to log in. I don't care to become a member. Can you post your code here?