Comparing list and matrix elements



I have the following code I need help debugging. I would appreciate your review. I suspect that my comparrison statements are incorrect as noted below.


load(descriptive)$
L:read_matrix("e:\\spacetimemath\\data.txt",space)$
ut: length(L)$
s:zeromatrix(ut,1)$
for i: 1 thru ut step 1 do
    s[i,1]: lsum(j,j,L[i]);
ub: mean(s) + std(s), numer;
lb: mean(s) - std(s), numer;
Lstd: matrix([0,0,0,0,0,0]);
for i: 1 thru 10 step 1 do
    (x0: s[i],
    display(x0), - this line executes
    if(x0 > lb) then display(lb), - this comparrison statement provides no output
    if ((x0 > lb) and (x0 < ub)) then Lstd: addrow(Lstd, L[i])); - this comparrison also fails, Lstd has no additional rows.


Many thanks in advance for the help.

Ronald F. Modesitt