OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                           
 

2.2.3.22 patternN

Menu Information

Column:Fill Column With:A set of Numbers

Brief Information

Fill column with numeric data

Additional Information

Minimum Origin Version Required: 9.1 SR0


Command Line Usage

1. patternN irng:=col(A) from:=5 to:=1 inc:=-1;//Fill value 5, 4, 3, 2, 1 to the first 5 cells in column A

2. patternN irng:=[Book1]1!(1,2) from:=0 to:=1 inc:=0.5 mode:=1 size:=100;//Randomly fill values 0,0.5,1 to the first two columns of Book1 sheet1, each column will have 100 rows of data.

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input irng

Input

Range

<active>
Specifies the range of data columns you would like to fill values to.
From from

Input

double

1
Specify the starting value of the generated data sequence.
To to

Input

double

10
Specify the ending value of the generated data sequence.
Increment inc

Input

double

1
Specify the increment within the generated data sequence.
Mode mode

Input

int

0
Specify how the generated data should be arranged.

Option list:

  • 0:Repeat
    The values in the generated data sequence will be filled to the selected column(s) by ascending/descending order (When Inc is positive, will be in ascending order, when it is negative, will be in descending order). And it is also possible to define the repeat times for each value and the whole sequence(onerepeat and seqrepeat) in the generated dataset to determine the dataset size.
  • 1:Random
    For each cell in the selected column, one value randomly picked from the generated data sequence will be filled into this cell. You can specify the value of size as the size of the generated dataset.
Repeat Times for Each Value onerepeat

Input

int

1
This variable is only controllable when the Mode variable is 0:Repeat. It specifies how many times each value repeats itself in the generated data sequence.
Repeat Times for The Sequence seqrepeat

Input

int

1
This variable is only controllable when the Mode variable is 0:Repeat. It specifies how many times each whole data sequence repeats itself in the generated dataset.
Total Number of Whole Set size

Input

int

10
This variable is only writable when the Mode variable is 1:Random. It specifies the total number of values in the whole dataset which will be generated based on the current setting.

Description

For GUI access of this function, see this help file.

Examples

Create a new workbook and highlight the first column (column A), in the Script Window or Command Window, run the following script:

patternN from:=0 to:=100 inc:=10 onerepeat:=2 seqrepeat:=3;

This script repeatedly fills the active column with three sets of data sequences. The data sequence is defined in the form of 0 0 10 10...90 90 100 100, that each value repeats itself twice.


Related X-Functions

patternD, patternT

 

© OriginLab Corporation. All rights reserved.