LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array pattern trend

case structure?

0 Kudos
Message 11 of 21
(993 Views)

But what should my condition be because there is alot of possibility it can be a array with 2 element, a array with 3 element or any number of element's array without pattern?

0 Kudos
Message 12 of 21
(990 Views)

If there is no other occurrence of the first element value, you have one repeat with a size of the original array size.

0 Kudos
Message 13 of 21
(979 Views)

Overall, you need to be much more precise with the specifications. For example:

 

  • Are all elements in a single repeat always unique or do you allow duplicates? (e.g. (1-1-2-3-4-1-1-2-3-4-1-1-2-3-4-...)
  • Are all repeats identical or do you allow small variations?
  • Is the array size always a multiple of the pattern lenght or could the last pattern be truncated?
  • What is the desired result for an empty array input?
  • Is NaN allowed as an element?
0 Kudos
Message 14 of 21
(966 Views)

11111.png

0 Kudos
Message 15 of 21
(957 Views)

Isn't your point #2 a contradiction? If you allow small variations, they won't be identical. Define what you mean by "small"! Is it sufficient to round points with small deviations to the nearest grid point? Are the grid point always whole numbers?

 

Pictures are useless! Why don't you make our life easier and attach the actual (or simplified) VIs containing typical data in diagram constants (that you already seem to have!). Do you really expect us to re-create everything from an image? We have better things to do!

 

I also don't understand your graphs, because they don't look very parametric. It looks more like a plain 3D surface graph with an x,y grid (represented as two 1D vectors) and a z height. What do you actually want to see???

0 Kudos
Message 16 of 21
(952 Views)

I am so sorry to have caused inconvient to you. Okay, I will just say that my repeats are identical.

 

You are right " It looks more like a plain 3D surface graph with an x,y grid (represented as two 1D vectors) and a z height.". I just want to look at the surface and the point.

 

3D parametric graph.png

0 Kudos
Message 17 of 21
(948 Views)

There are many ways to do this, so here's one possibility. See if it works for you. Most likely it needs to be adapted to the specific requirements.

 

 

 

(Also note that your use of string diagram constants as labels is a bit awkward. You can show the label of diagram constants and enter useful information there. This has the advantage that things stay together.)

0 Kudos
Message 18 of 21
(937 Views)

The above assumes that the data in the input array might not be regular (e.g. only cover a circular area or similar). In the case if very regular data as in your example data, the code could be much simpler. Try it!

0 Kudos
Message 19 of 21
(924 Views)

You mean always repeat? The array I get will either be a pattern of itself or repeats. Thanks so much, I have learn quite alot of new things today. 🙂 I saw your logo turn from 15K to 20 K congrates. 🙂

0 Kudos
Message 20 of 21
(921 Views)