Home »
Public Forums »
archive »
Matching Structure Tag Lengths
Matching Structure Tag Lengths [message #31227] |
Thu, 27 June 2002 22:45 |
doyle
Messages: 6 Registered: April 2002
|
Junior Member |
|
|
Hi there everyone. I've got a kind of confusing question that I can't
quite figure out.
I've got a bunch of data that is stored in two different structures,
structure P and structure S. Structure P has 16 tags each of which is
approximately an eighth of size of the tags in structure S (Structure
S has 21 tags but that's pretty inconsequential).
What I need to do is do some sort of interpolation between the two
structures to make the arrays in Structure P the same size as the
arrays in Structure S. I have an array in each structure that I know
starts and ends at the same number so I'm trying to use this to do the
interpolation. My code is below. I'm trying to use the replicate
function but it doesn't seem to do the trick. I think I'm doing
something wrong. Any help would be appreciated.
p2=replicate(P[0],n_elements(S)) ; n_elements is a function that
determines the number of elements
for i=0,n_tags(P)-4 do begin
temp=interp1(P.ms,P.(i),S.ms)
P2.(i)=temp
endfor
the last three elements of P are meaningless hence the -4. The .ms is
the array that I know to be equal.
This is as far as I've gotten. Unfortunately I cannot do this at work
as my computer won't connect to the board and allow me to post.
Thanks in advance.
Nate Doyle
|
|
|
Current Time: Wed Oct 08 17:41:08 PDT 2025
Total time taken to generate the page: 0.00559 seconds