# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Array Interpolation

hello!I have an array ,Assuming it has 100 values,it's Arbitrary, I want to insert values:

After two each in the array values to insert a value, such as 0 ,This has been the cycle continues until the end, Then get a new array,how should I do ??

Spoiler

Message 1 of 8
(1,493 Views)

## Re: Array Interpolation

Seems like a very simple problem. What have you tried so far?

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 2 of 8
(1,473 Views)

## Re: Array Interpolation

Hi dfaweew,

You can insert those values into an array if you can make use of "Insert into Array" vi .

Regards.

SrikrishnaNF

Regards,
Srikrishna

Message 3 of 8
(1,472 Views)

## Re: Array Interpolation

srikrishnaNF wrote:

Please don't attach "solutions" until you have tested them. You code makes absolutely no logical sense. Ever heard about shift registers?

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 4 of 8
(1,463 Views)
Solution
Accepted by topic author dfaweew

## Re: Array Interpolation

@dfaweew wrote:

hello!I have an array ,Assuming it has 100 values,it's Arbitrary, I want to insert values:

After two each in the array values to insert a value, such as 0 ,This has been the cycle continues until the end, Then get a new array,how should I do ??

As a first step you need to describe the problem much more accurately.

If you have an array with 100 elements, do you (1) want to replace every third element with zero, keeping the array size constant, or do you  (2) want to insert extra elements, making the final array 50% larger?

Here's a simple draft for case (2).

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 5 of 8
(1,453 Views)

## Re: Array Interpolation

Hi dfaweew,

I am so sorry as i have posted a wrong solution...I just posted another screenshot of block diagram.

Hope this helps you..

Regards,

SrikrishnaNF

Regards,
Srikrishna

Message 6 of 8
(1,439 Views)

## Re: Array Interpolation

srikrishnaNF wrote:

I am so sorry as i have posted a wrong solution...I just posted another screenshot of block diagram.

Hope this helps you..

You are doing this way too complicated! It also looks very inefficient with the repeated array resizing operations.

Now try to do the same with 10% of the code!

(also please attach the actual VI instead of pictures. we cannot run pictures)

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 7 of 8
(1,432 Views)

## Re: Array Interpolation

thank you,i got it!

Spoiler

Message 8 of 8
(1,416 Views)