View Single Post
CompuChip
#2
Jan11-12, 11:10 AM
Sci Advisor
HW Helper
P: 4,300
Maybe you need to re-assign the result to the list:
LM = Append[LM, m]
(If this solves the problem, don't feel bad... you don't want to know how many hours I spent looking for similar mistakes)

Also, if the whole body of your module is a single If-statement, what do you need the module for?
You can just as well write
For[..., ..., LM = Append[LM, If[...]]]
instead of
For[..., ..., Module[m = If[...]; LM = Append[LM, m]]