There is no reason to consider individual vector components.
Rewrite your code in vector form like most of the code that is posted in both NEWSGROUP and ANSWERS. For example, search on
greg fitnet train
Hope this helps.
Greg
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!