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

Home » Public Forums » archive » Re: Help with FOR ...DO BEGIN..........I'M A BEGINNER, begging for some help!!!!!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Help with FOR ...DO BEGIN..........I'M A BEGINNER, begging for some help!!!!! [message #81980] Sun, 04 November 2012 02:51
Mati is currently offline  Mati
Messages: 3
Registered: October 2012
Junior Member
Thank you!!!!
Re: Help with FOR ...DO BEGIN..........I'M A BEGINNER, begging for some help!!!!! [message #81983 is a reply to message #81980] Sat, 03 November 2012 14:42 Go to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Sat, 3 Nov 2012 14:30:14 -0700 (PDT), Marta wrote:

> Hi,I'm Marta sorry if this is not the right place to write!!!My problem is:
> I've got 4 one row numer arrays of different lenghth
> A = [1,2,3]
> B = [4,5,6,7]
> C = [8,9,10]
> D = [11,12,13,14]
> I want to do this operation:
> -pick first element of A,1,and the first element of C,8, then calculate (1-4)+(8-11),(1-5)+(8-12),(1-6)+(8-13),(1-7)+(8-14).
> them pick the second element of A, the second element of C and do it again...
> at the end put all results in a file.........
>
> Thank you for theattention and eventually for help! (my english is not very good)

Hi Marta,

you can do this:

first=(a[0]-b)+(c[0]-d)
second=(a[1]-b)+(c[1]-d)

or, if you want to have all results within one array:

result=intarr(4,3)
for i=0,2 do result[0,i]=(a[i]-b)+(c[i]-d)

Cheers, Heinz
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Don't retrieve !D.Y_VSIZE too quickly
Next Topic: Re: Don't retrieve !D.Y_VSIZE too quickly

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

Current Time: Wed Oct 08 09:15:23 PDT 2025

Total time taken to generate the page: 0.00630 seconds