LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Expand 32 entry array to 1024 with interpolation

Solved!
Go to solution
Hello,

I'm attempting to take a 32 entry array, expand it to 1024 entries with the 32 original entries evenly spaced. Then, I need to linearly interpolate between each of those 32 spread-out entries and fill in the remaining 30 blank entries in between each original 32 now evenly spaced entries.

Ex:

Take the original:
1
2
3
...
30
31

And create the expanded:

0
(1/31 * (entry 0 - entry 1))
(2/31 * (entry 0 - entry 1))
...
(31/31 * (entry 0 - entry 1))
1
(1/31 * (entry 1 - entry 2))
...

I can perform this expansion in a brute force method, but the Interpolate 1D Array VI suggests a much more effecient method that escapes me. There doesn't seem to be any good examples for the general operation of the Interpolate 1D Array VI to learn from. It appears to auto-index and take care of several operations at once, requiring a non-indexed entry into a FOR loop.

Any guidance is greatly appreciated. 
0 Kudos
Message 1 of 3
(2,681 Views)

Look for VI's labelled "Resample" or "Resampling".

Message 2 of 3
(2,668 Views)
Solution
Accepted by topic author Fco1235

I agree with RavensFan.

 

If you want to do a brute force method, consider using Ramp Pattern.vi inside a loop.

 

Lynn

 

 

Message 3 of 3
(2,658 Views)