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

Home » Public Forums » archive » Re: from array to one dimentional 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: from array to one dimentional array [message #45502 is a reply to message #45501] Tue, 13 September 2005 09:42 Go to previous messageGo to previous message
Timm Weitkamp is currently offline  Timm Weitkamp
Messages: 66
Registered: August 2002
Member
David Fanning wrote:
> steffenfr writes:
>
>> Dear all, I am trying to apply the spearman correlation
>> coefficient to 2 images which means that I have to compare
>> 2 arrays. The R_correlate however works only with one dimentional
>> arrays which means that I need to change the n-dimentional array into a
>> one-dimentional one, for example like that
>>
>> Array: 3by3
>>
>> 111
>> 222
>> 333
>>
>> into the one-dimentianl array (Vector) [9by1] which is [111222333]
>>
>> Does anybody know how do do that in a simple way, or has anybody done
>> it alreay in a program?
>
> I would try REFORM:
>
> s = Size(array, /Dimensions)
> array = Reform(array, s[0]*s[1])

Or simply,

array = array[*]

Cheers,
Timm

Timm Weitkamp, ESRF, Grenoble, France
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: no drag events in cw_fslider or widget_slider
Next Topic: Force Field

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

Current Time: Sat Oct 11 06:45:26 PDT 2025

Total time taken to generate the page: 0.72147 seconds