Question: seq and list in procedure

Good Day Everyone,

My first question is with regards to sequence function in Maple. I have input into Maple the following

xp := map(z->z*[ft], [0.0, 3.3, 3.3, 0.0])

yp := map(z->z*[ft], [0.0, 0.0, -3.3, -3.3])

npile := nops(xp)

d := [seq(sqrt((xp[i] - xp[i + 1])^2 + (yp[i] - yp[i + 1])^2), i = 1..npile)]

I was getting an error message from Maple, "Error, invalid subscript selector", what have I done wrong in Maple?

 

My second question is with regards to using list data in a procedure. I have the following data that I would like to generate a list of linear interpolation of each value in x (see, below)

x := [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 7.5, 10.0, 12.5, 15.0, 17.5, 20.0, 22.5, 25.0, 30.0]*[ft]

T := 1.887*[m]

AY := proc(x, T)
             local Z, Ay, Ratio, beta;
                Ratio := simplify(evalf(x / T));
                Z := [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.2, 1.6, 1.8, 2.0, 3.0, 4.0, 5.0];
                Ay := [2.435, 2.273, 2.112, 1.952, 1.796, 1.644, 1.496, 1.353, 1.216, 1.086, 0.962, 0.738, 0.544, 0.381, 0.247, 0.142, -0.075, -0.050, -0.009];
                 beta := evalf[4](CureFitting:-ArrayInterpolation(Z, Ay, Ratio));
         end proc;

My goal is to do a linear interpolation of each value of x in the List and then output a List of AY. Please, I do not no how to use Maple to do this.

Regards

Moses 

Please Wait...