msim_polysplit

| main | Tutorials | Functions | website |

This is equivalent to the matlab polysplit command. The only reason that we reimplement this, it's to avoid the dependency on the mapping toolbox. In addition as for now the Octave is missing this function therefore many functions of mSim couldn't run. Version : 1.0

Author : George Kourakos

email: giorgk@gmail.com

web : http://groundwater.ucdavis.edu/msim

Date 18-Mar-2014

Department of Land Air and Water

University of California Davis

Contents

Usage

[Xs, Ys] = msim_polysplit(X, Y)

Input

X: [n x 1] A vector of x coordinates

Y: [n x 1] A vector of y coordinates

Output

Xs: A cell array of segments of the X coordinates split into Nans

Ys: A cell array of segments of the Y coordinates split into Nans

Example

Create 2 vectors X and Y with some nans at the same colums:

X = [8,9,1,9,NaN,1,NaN,NaN,NaN,10,NaN,10,NaN,5,8,1,4,9,8,NaN];
Y = [3,2,7,8,NaN,8,NaN,NaN,NaN, 4,NaN, 0,NaN,4,5,8,3,8,5,NaN];
[Xs, Ys] = msim_polysplit(X, Y)
Xs =

  5×1 cell array

    {4×1 double}
    {[       1]}
    {[      10]}
    {[      10]}
    {6×1 double}


Ys =

  5×1 cell array

    {4×1 double}
    {[       8]}
    {[       4]}
    {[       0]}
    {6×1 double}

| main | Tutorials | Functions | website |