functionlinspaceRepeat_2Dedge

Create [m] linearly spaced 2D matrix stored in a [n1,n2,m] matrix from the linear interpolation of 4 edge values

Extends from TRANSFORM.Icons.Function (Icon for functions).

Information

For example:

For x1=fill(0,m), x2=fill(10,m), x3=fill(-5,m), x4 = fill(5,m), n1=5, n2=3, and m=2.

The returned matrix is y[5,3,2]. For the given input each m dimension is identical.

-2.5

0

2.5

-5

1.25

5

-5

2.5

5

-5

3.75

5

2.5

10

7.5


The exposeState option is present once again to assist with discretized boundary conditions (see linspace_2Dedge).

Inputs

TypeNameDefaultDescription
Real[:]x1Edge value x[1,:,m]
Real[:]x2Edge value x[end,:,m]
Real[:]x3Edge value x[:,1,m]
Real[:]x4Edge value x[:,end,m]
Integern1Number of rows
Integern2Number of columns
Boolean[4]exposeState{true, true, true, true}= true then set edge to value specified else linspace_1D

Outputs

TypeNameDefaultDescription
Real[n1,n2,size(x1, 1)]y3-D matrix of a repeated 2-D matrix