Skip to Main Content Skip to Search
Product Documentation

repsys - Replicate and tile models

Syntax

rsys = repsys(sys,[M N])
rsys = repsys(sys,N)
rsys = repsys(sys,[M N S1,...,Sk])

Description

rsys = repsys(sys,[M N]) replicates the model sys into an M-by-N tiling pattern. The resulting model rsys has size(sys,1)*M outputs and size(sys,2)*N inputs.

rsys = repsys(sys,N) creates an N-by-N tiling.

rsys = repsys(sys,[M N S1,...,Sk]) replicates and tiles sys along both I/O and array dimensions to produce a model array. The indices S specify the array dimensions. The size of the array is [size(sys,1)*M, size(sys,2)*N, size(sys,3)*S1, ...].

Tips

rsys = repsys(sys,N) produces the same result as rsys = repsys(sys,[N N]). To produce a diagonal tiling, use rsys = sys*eye(N).

Input Arguments

sys

Model to replicate.

M

Number of replications of sys along the output dimension.

N

Number of replications of sys along the input dimension.

S

Numbers of replications of sys along array dimensions.

Output Arguments

rsys

Model having size(sys,1)*M outputs and size(sys,2)*N inputs.

If you provide array dimensions S1,...,Sk, rsys is an array of dynamic systems which each have size(sys,1)*M outputs and size(sys,2)*N inputs. The size of rsys is [size(sys,1)*M, size(sys,2)*N, size(sys,3)*S1, ...].

Examples

Replicate a SISO transfer function to create a MIMO transfer function that has three inputs and two outputs.

sys = tf(2,[1 3]);
rsys = repsys(sys,[2 3]);

The preceding commands produce the same result as:

sys = tf(2,[1 3]);
rsys = [sys sys sys; sys sys sys];
 

Replicate a SISO transfer function into a 3-by-4 array of two-input, one-output transfer functions.

sys = tf(2,[1 3]);
rsys = repsys(sys, [1 2 3 4]);

To check the size of rsys, enter:

size(rsys)

This command produces the result:

3x4 array of transfer functions.
Each model has 1 outputs and 2 inputs.

See Also

append

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS