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

Home » Public Forums » archive » Re: basic soubt with fltarr
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: basic soubt with fltarr [message #30212 is a reply to message #30210] Wed, 10 April 2002 06:01 Go to previous messageGo to previous message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
Muks Raju <mpraju@umich.edu> wrote in message news:<3CB3F827.312818F9@umich.edu>...
> Hello all...i have a basic doubt with fltarr. I have this fltarr
> Actuator = fltarr(100,4)
>
> now i need to remove the first 3 columns. How do i do this. Also i may
> need to add 3 columns at the beginning and at the end or maybe a column
> of data in the middle. Ive seen about a million websites and help pages.
> None of them seem to be of any help. Could somebody please help me.
>
>
> Thanks in advance.
>
> Mux


You're bound to get some very clever responses to this one. Here's
possibly the least clever way:

Start with A = FLTARR(100,4).


* To remove the first three columns:

new = FLTARR(97,4)
new[*,*] = A[3:*,*]
A = new


* To add 3 more columns at the beginning:

new = FLTARR(103,4)
new[3:*,*] = A
A = new


* To add a column in the middle (at position p):

new = FLTARR(101,4)
new[0:p-1,*] = A[0:p-1,*]
new[p+1:*,*] = A[p:*,*]
A = new


It is possible to avoid using 'new' in most cases but you may prefer
doing it like this until you are comfortable with incomprehensible
array concatenation shennanigans.

Ciao.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL5.5 XROI problem...
Next Topic: Re: In Praise of HISTOGRAM

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

Current Time: Fri Oct 10 04:12:34 PDT 2025

Total time taken to generate the page: 1.19927 seconds