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

Home » Public Forums » archive » Re: IDL calculating elements in arrays plus there offsets
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: IDL calculating elements in arrays plus there offsets [message #70039 is a reply to message #70038] Mon, 08 March 2010 04:44 Go to previous messageGo to previous message
Will is currently offline  Will
Messages: 7
Registered: June 2004
Junior Member
On Mar 8, 12:31 pm, Spon <christoph.b...@gmail.com> wrote:
> On Mar 8, 11:43 am, Will <theloneguitar...@hotmail.co.uk> wrote:
>
>
>
>
>
>> Hi
>
>> sorry I don't think the heading was very clear there.
>
>> I have loaded a group of arrays (jpeg files) into a seperate float
>> array, and again with another group of files I have done the same
>> thing. I am now trying to have the two arrays perform a subtraction
>> calculation with one another and what I want to do is have the arrays
>> do this with each other until they have did the calculation with every
>> element. i.e
>
>> it does the first calculation, then offsets the elements by one to the
>> right and does the next calculation then repeats this until it has
>> done every element in the array.
>
>> I was curious as to how to do this successflly I am currently trying
>> to use a FOR loop after my Repeat loop failed. I have the maths I need
>> here but I don't know how to access the subscripts of my array. I have
>> inputted all the files into an array using the FLOAT command. the
>> likes of FLTARR just keeps saying that I have more than 8 dimensions
>> and hence it won't work.
>
>> Any ideas guys?
>
>> Thanks
>
>> Will
>
> Hi Will,
>
> do you mean like this?:
>
> arr1 = [3, 4, 2, 8]
> arr2 = [1, 0, 4, 8]
> diff = arr1 - arr2
>
> print,diff
>        2       4      -2       0
>
> 'diff' will be a 4-element, one dimensional array in this case, but
> can just as easily be multidimensional.
> So long as the number of elements in both arrays are the same, simply
> using the '-' operator will do.
>
> Regards,
> Chris- Hide quoted text -
>
> - Show quoted text -

No i'm afraid not Chris, What I am doing is comparing two large
amounts of images with each other but the images are in a specific
order and can't be changed. These images then need to find the best
fit location. So i am using a float array fo i can print out a single
figure as the images try to find the best fit location but i need to
access my subscripts and find the offset. so one set of these bundles
will move over the other bundle to the right for instance doing a
calculation to determine how similar they are (simple subtraction) and
then move down a row and do the same thing. then with all these single
point numbers i can make a plot and where the line is closest to 0 is
where my images were best matched.

hope that jargon made sense

Will
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: OT: Summer of Code 2010 is on!
Next Topic: Dynamic arrays in structs: re-allocation problem

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

Current Time: Fri Oct 10 11:28:59 PDT 2025

Total time taken to generate the page: 0.63994 seconds