#
# Make up test set (mimics sequence with half low intensity, followed by
# half high intensity)
#
test.set <- c(8,5,6,3, 30,40,20,35)
#
# Do forward HFT
#
test.hft <- hft(test.set)
test.hft
# [1] 16.38621 15.20951 15.65216 14.23795 21.20421 22.89452 19.27753 22.13791
#
# Do inverse HFT
#
test.back <- hft.inv(test.hft)
test.back
# [1] 8 5 6 3 30 40 20 35
#
# Same as original
#
Run the code above in your browser using DataLab