How to do like this with array?

How to do like this with array?
I have 2 constants array put in main while loop ( array1{6,6}; array2{4,4} ). Those arrays will be come the input data for st in the small while loop inside.
The input data look like : [6,6],[4,4],[6,6],[4,4]...... I have to put input data to result array[8]. The method is:
input data result data
[6,6] --------------------------------------------> [6,6,0,0,0,0,0,0]
[4,4] --------------------------------------------> [6,6,4,4,0,0,0,0] ( this period, just add each element in new array)
[6,6] --------------------------------------------> [6,6,4,4,6,6,0,0]
[4,4] --------------------------------------------> [6,6,4,4,6,6,4,4]
[6,6,4,4,6,6,4,4] ( 1st period )
When the las index of result data array is filled in, I have to collapse the result data array to be this array:
----------> collapse: [6,4,6,4,0,0,0,0] ( take the average of 2 continuous element add to new result data array)
Next input data
[6,6] --------------------------------------------> [6,4,6,4,6,0,0,0]
[4,4] --------------------------------------------> [6,4,6,4,6,4,0,0] ( this period, add the average of 2 continuous elements in new array )
[6,6] --------------------------------------------> [6,4,6,4,6,4,6,0]
[4,4] --------------------------------------------> [6,4,6,4,6,4,6,4]
[6,4,6,4,6,4,6,4] ( 2 nd period)
----------> 2nd collapse [5,5,5,5,0,0,0,0] ( take the average of 2 continous element add to new result data array)
Next input data
[6,6] ....wait until input data has 4 elements
[4,4] -------------------------------------------------------------------------------------> [5,5,5,5,5,0,0,0]
[6,6] ....wait until input data has 4 elements
[4,4] -------------------------------------------------------------------------------------> [5,5,5,5,5,5,0,0]
[6,6] ....wait until input data has 4 elements
[4,4] -------------------------------------------------------------------------------------> [5,5,5,5,5,5,5,0]
[6,6] ....wait until input data has 4 elements
[4,4] -------------------------------------------------------------------------------------> [5,5,5,5,5,5,5,5]
[5,5,5,5,5,5,5,5] ( third period )
----------> 3rd collapse [5,5,5,5,0,0,0,0]
This wayl to make the tren graph.I  made  an VI to do that , but it's not yet correct.
Attachments:
tryyyyyyy.vi ‏39 KB
trend_mode.JPG ‏49 KB

Frankly, I don't understand your problem description or your VI.
In the description, the output array has a fixed size of 8 elements, is this correct? In this case you should initialize an array of 8 elements and do all operations "in place". I don't udnerstand the purpose of all the other code.
There are a lof of things that don't make any sense at all.
The second largest loop has no purpose, because it iterates only once per call
Sometimes you are concatenating an empty array to an existing array. This makes no difference.
Why is some of your data EXT representation???
What's up with complicated constructs such as that small loop shown in the picture. I show a somewhat simpler alternative.
Anyway, I have a hard time understanding your description. What should happen at the end? Do you have a link to a website that describes the algorithm? Does the algorithm have a name?
Message Edited by altenbach on 01-10-2008 09:55 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Simplify.png ‏5 KB

Similar Messages

Maybe you are looking for

  • Reversing the CO Document.

    Hello, Overhead is calculated for 4.2% wherein the costing sheet it's maintained as 2.1%.. Requirement we need to reverse the original document which was posted calcuating 4.2% and post an other document Document is a controlling doucment- Secondary

  • Third Party Billing and Routing

    How has anyone handling third party billing with routing algorithm utilizing the routing instructions?

  • ClassCastException when I access an EJB from a remote EJB in WL 8.1

    I am using WebLogic 8.1 and am trying to lookup the home interface for an EJB (_ejbRemote_) from another EJB (_ejbCurrent_). They are deployed in seperate EARs. When I bundle the home and remote interfaces for ejbRemote in the EAR file that ejbCurren

  • Can't move apps to sd card in A3000

    I Have a big problem. There is no move to sd card or move to internal storage button in my settings ( under clear data button) ! What should I do ??????? Spoiler (Highlight to read)

  • Is there a video tutorial for using cyberduck and iweb?

    So, is there a video tutorial for using cyberduck and iweb to upload to a website? The written instructions on iweb are not specific enough.