comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Icrease a elements in a array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Icrease a elements in a array [message #91801 is a reply to message #91798] Sat, 29 August 2015 09:27 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 8/28/15 4:15 pm, Joyrles Fernandes wrote:
> I have a array with 8 elements. I need to maintain the first and the
> last element, can't change and to change the others six. How do i
> do?
>
> thanks for listening.
>

Change only elements 1 to 6 then, i.e., if

x = findgen(8)

then do things like:

x[1] = 1.5
x[1:6] = findgen(6) * 3.0
etc.

where you don't access x[0] and x[7]. Do you mean something else?

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
[Message index]
 
Read Message
Read Message
Previous Topic: help with WHERE( ) function
Next Topic: Mosaicking a folder of TIFF files that includes 1-D horizontal strips

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:00:00 PDT 2025

Total time taken to generate the page: 0.00441 seconds