Bounding & Smoothing

Data bounding operates on individual pieces of data versus data smoothing which has more effect on neighboring data points.. The program in the book was a combined bounding and smoothing program which I could not get to functionproperly.  I have included it (bsandd.bas), and if any of you mathematicians out there can figure it out, your help will be much appreciated.

Downloads:

Basic programming (liberty basic) - bound.bas (bounding portion only - tested ok)

Basic program (liberty basic) - bsandd.bas (smoothing function not working).

 

Test case (data is embedded in program):


Data Bounding

Number of points to input? 20
Use keyboard (k) or read from data (d)? d

Data bounding

Result: Data bounded

X(1)= 84
Y(1)= 84

X(2)= 85
Y(2)= 85

X(3)= 83
Y(3)= 92.1104336

X(4)= 105
Y(4)= 105

X(5)= 108
Y(5)= 108

X(6)= 123
Y(6)= 111.909463

X(7)= 107
Y(7)= 107

X(8)= 96
Y(8)= 96

X(9)= 102
Y(9)= 102

X(10)= 92
Y(10)= 101.591663

X(11)= 111
Y(11)= 100.464346

X(12)= 93
Y(12)= 102.643651

X(13)= 102
Y(13)= 91.9004951

X(14)= 76
Y(14)= 84.7177979

X(15)= 78
Y(15)= 78

X(16)= 64
Y(16)= 64

X(17)= 64
Y(17)= 64

X(18)= 61
Y(18)= 61

X(19)= 54
Y(19)= 54

X(20)= 51
Y(20)= 51