Re: skipping index values

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 02 2014 - 15:57:36 MDT

Hi Ioana,
It looks like you want the strided form of a do loop.

In your case it might be:

  do i = 0, nlagr-1, 4

     ; i will successively equal 0, 4, 8, …

 end do
 
Hope this helps,
 -dave

On Jun 2, 2014, at 3:12 PM, Ioana Colfescu <colfescu@cola.iges.org> wrote:

> Hi,
> I want to write/plot an index just for every n values. Does anyone know
> what's the syntax for that in NCL ?
> I.e : rather than saying
> do i=0,nlagr-1
> ....
> end do
> I want to do something like i=0:4:nlagr-1.
> Thanks,
> Ioana
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 2 15:57:44 2014

This archive was generated by hypermail 2.1.8 : Tue Jun 03 2014 - 11:40:09 MDT