Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Make your for loop i=0:L
As long as you aren't calling or assigning to an array element zero, like s(0)... then your code should work.
Additionally, you could shift everything by 1, making the loop run 0 to L, but where ever you have "i", change it to "i+1", so the first time through the loop you'll always have i+1 give you a 1, and not a 0.
Without seeing more of your code, its tough to say which method will work best for your situation.