Difference between revisions of "Reprows.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Expand See also links to related Spinach functions and docs)
(Fix lead description from MATLAB header (folding/hyphenation pass))
Line 1: Line 1:
 
{{DISPLAYTITLE:reprows.m}} __NOTOC__
 
{{DISPLAYTITLE:reprows.m}} __NOTOC__
−
Replicates specified rows of a matrix or cell array a
+
Replicates specified rows of a matrix or cell array a specified number of times.
  
 
==Syntax==
 
==Syntax==

Revision as of 20:51, 22 February 2026

Replicates specified rows of a matrix or cell array a specified number of times.

Syntax

               B=reprows(A,row_nums,rep_counts)

Arguments

      A          - a numeric matrix or a cell array
      row_nums   - vector of row indices to replicate
      rep_counts - vector of positive integers specifying
                   how many copies of each row to make

Outputs

      B          - same type as A

Examples

See examples in the Spinach distribution relevant to this function.

Notes

This page was generated from the function header in the Spinach repository.

See also


Version 2.11, authors: Ilya Kuprov