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

Home » Public Forums » archive » Re: how to extend a vector from size A to size B, (A<B) without "damage" the data in A
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: how to extend a vector from size A to size B, (A<B) without "damage" the data in A [message #79515 is a reply to message #79514] Wed, 07 March 2012 17:48 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tito_trifonov@abv.bg writes:

> I have the fowling problem:
> I have a array vector A with size [970] elements lets say, and another that is 'B' with [1024] elements. now... both contain spectra and I want to do cross-correlation between the two vectors. This will be possible if A is 1024 element vector.
>
> I am new in IDL and shoot and try several thing here like:
> A = interpol(A,1024)
> and I saw also someone suggested:
> A = [A, intarr(n_elements(B)-n_elements(A))] , but doesn't give me what I want.
>
> A is synthetic spectra (mask) and I just want to increase the resolution without losing the quality of the data(the relative distances between the lines)
>
> A = interpol(A,1024), actually works, but I see very obvious differences in the 970 and the result spectra.
>
> Anybody know how to do it?

Have you tried A = Congrid(a, 1024)?

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Question about storing arrays in pointer array.
Next Topic: Re: using cgSurface to produce a scatter 3D plot with 4th dimension

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

Current Time: Fri Oct 10 08:36:43 PDT 2025

Total time taken to generate the page: 1.19542 seconds