Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

stats::concatRow

Concatenate samples row-wise

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

stats::concatRow(s1, s2, <s3, …>)

Description

stats::concatRow(s1, s2, …) creates a new sample consisting of the rows of the samples s1, s2 etc.

All samples must have the same number of columns.

Examples

Example 1

We create a small sample:

stats::sample([[123, g], [442, f]])
123  g
442  f

A list is concatenated to the sample as a row:

stats::concatRow(%, [x, y])
123  g
442  f
  x  y

Example 2

The following samples contain columns for "gender" and "age":

s1 := stats::sample([["f", 36], ["m", 25]]);
s2 := stats::sample([["m", 26], ["f", 22]])
"f"  36
"m"  25
"m"  26
"f"  22

We build a larger sample:

stats::concatRow(s1, s2)
"f"  36
"m"  25
"m"  26
"f"  22
delete s1, s2:

Parameters

s1, s2, …

Samples of domain type stats::sample. Alternatively, lists may be entered, which are treated as rows of a sample.

Return Values

Sample of domain type stats::sample.

See Also

MuPAD Functions

Was this topic helpful?