Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Labtalk Function to Generate Patterned Data

(ORG-7900)

  • To generate numeric data:
Code Block
/// numeric
col(A)=pattern(1,10,2,2,3); /// from, to, inc, value repeat count, sequence repeat count
/// string
  • To generate string data:
Code Block
stringarray sa;
sa.Add("NY");
sa.Add("MA");
col(B)=pattern(sa, 2, 3); /// string sources, value repeat count, sequence repeat count
//can also allow quoted string separated by pipe, comma, or space
col(B)=pattern("NY|MA", 2, 3);
col(B)=pattern("NY,MA", 2, 3);
col(B)=pattern("NY MA", 2, 3);
  • To generate pattern data based on a column:
Code Block
col(B)=pattern(col(c), 2, 3); //alsodata source, canvalue haverepeat itcount, fromsequence arepeat rangecount
col(B)=patternuniform(col(c), 2, 3);30, col(A)); //randomly choose 30 elements from col(A) to fill col(B)

SupportĀ Variables for Row SubrangeĀ Notation

...