[Thread Prev][Thread Next][Index]

Re: [ferret_users] generate a constant array


Use the XCAT function to concatenate in X:

   let years = xcat(x[i=1:`nyr`:100],281)



On Tue, 18 Mar 2008, David Wang wrote:

Hi Ferreters,

I'd like to generate a evenly-spaced constant array except the last element.
For example,

{1, 101, 201, 281}

I tried:

yes? LET NYR = 280
yes? LET YEARS = X[I=1:`NYR`:100]

But this only gives {1, 101, 201}. How can I pad the element of 281? In my
working code NYR is returned from another expression (not explicitly
specified as above).

Thanks very much,

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement