# doc-cache created by Octave 5.2.0
# name: cache
# type: cell
# rows: 3
# columns: 17
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
EAmatrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 684
copyright (c) 2011 Juan Pablo Carbajal <carbajal@ifi.uzh.ch>

    This program is free software: youcan redistribute itand/or modify
    it under the terms of the GNU General Public Licenseas publishedby
    the Free Software Foundation, either version 3 of the License, or
   any later version.

    This program is distributed in the hope that it willbe useful,
   but WITHOUTaNY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FORa PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have receivedacopy of the GNU General Public License
   along with this program. If not, see <http://www.gnu.org/licenses/>.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
copyright (c) 2011 Juan Pablo Carbajal <carbajal@ifi.uzh.ch>



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
RBequations_rot


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 684
copyright (c) 2011 Juan Pablocarbajal <carbajal@ifi.uzh.ch>
 
    This program is free software: youcan redistribute itand/or modify
    it under the terms of the GNU General Public Licenseas publishedby
    the Free Software Foundation, either version 3 of the License, or
   any later version.

    This program is distributed in the hope that it willbe useful,
   but WITHOUTaNY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FORa PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have receivedacopy of the GNU General Public License
   along with this program. If not, see <http://www.gnu.org/licenses/>.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
copyright (c) 2011 Juan Pablocarbajal <carbajal@ifi.uzh.ch>
 
    This progra...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
RBexample


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
 Example of a free rigid body (no torques)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
 Example of a free rigid body (no torques)




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
forcematrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1322
 -- Function File: [F, D] = forcematrix (POS, A,FUNCS)
     Evaluates a force function depending on the separation of multiple
     interacting points.

     *INPUT*

        * POS is a Nxdim array of positions.  N is the number of points
          and dim the dimension.  Each row represent a different point.

        * A is the a connectivity (adjacency) matrix expressed as a
          vector.  That is, if M is the complete NxN symmetric
          connectivity matrix, then 'A= vech(M)'.  The diagonal of M is
          not used.  The elements of A are indexes to the corresponding
          interaction force in FUNCS.  For example, there are 3 points
          and points 2 and 3 interact with a force described in the 5th
          element of FUNCS, then ' M(2, 3) = 5'.

        * FUNCS is a Nfx1 cell.  Elements that are matrices are
          evaluated with 'polyval'.  elements that are function handles
          are evaluated directly.  Functions handles must be of the form
          '@(X)f(X)', where x is the distance between two interacting
          points.

     *OUTPUT*

        * F is a Nxdim array of forces acting on each point.

        * D is an array in the same format as A containing the euclidean
          distances between the points.

     See also: pointmassmesh, polyval, vech, sub2ind.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Evaluates a force function depending on the separation of multiple
interactin...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
inertiamoment


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 468
 -- Function File: IZ = inertiamoment (PP, M)
     Moment of intertia of a plane shape.

     Calculates the moment of inertia respect to an axis perpendicular
     to the plane passing through the center of mass of the body.

     The shape is defined with piecewise smooth polynomials.  PP is a
     cell where each elements is a 2-by-(poly_degree+1) matrix
     containing 'px(i,:) =pp{i}(1,:)' and 'py(i,:) = pp{i}(2,:)'.

     See also: masscenter, principalaxis.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Moment of intertia of a plane shape.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
masscenter


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 309
 -- Function File: CM = masscenter (PP)
     Center of mass of a plane shape.

     The shape is defined with piecewise smooth polynomials.  PP is a
     cell where each elements is a 2-by-(poly_degree+1) matrix
     containing 'px(i,:) = pp{i}(1,:)' and 'py(i,:) = pp{i}(2,:)'.

     See also: inertiamoment.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
Center of mass of a plane shape.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
mat2quat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 121
 -- Function File: Q = mat2quat (R)
     This function is implemented in paclage quaternions and will be
     deprecated.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 75
This function is implemented in paclage quaternions and will be
deprecated.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
nloscillator


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2036
 -- Function File: [ DOTX, DOTXDX, U] = nloscillator (T, X, OPT)
     Implements a general nonlinear oscillator.

          q'' + p(q) + g(q') = f(t,q,q')

     where q is the configuration of the system and p(q), g(q') are
     homogeneous polynomials of arbitrary degree.

                  P
          p(x) = sum a_i q^i,
                 i=1
                   G
          g(x') = sum a_i (q')^i,
                  i=1

     This function can be used with the ODE integrators.

     *INPUTS*

     T: Time.  It can be a scalar or a vector of length 'nT'.

     X: State space vector.  An array of size '2xnT', where 'nT' is the
     number of time values given.  The first row corresponds to the
     configurations of the system and the second row to its derivatives
     with respect to time.

     OPT: An options structure.  See the complementary function
     'setnloscillator'.  The structure containing the fields:

     'Coefficients': Contains a vector of coefficients for p(x).  It
     follows the format used for function ppval 'opt.Coefficients(i) =
     a(P+1-i)'.

     'Damping': Contains a vector of the coefficients for g(x').  Same
     format as before.

     'Actuation': An optional field of the structure.  If it is present,
     it defines the function f(t,q,q').  It can be a handle to a
     function of the form f = func(T, X, OPT) or it can be a '1xnT'
     vector.

     *OUTPUT*

     DOTX: Derivative of the state space vector with respect to time.  A
     '2xnT' array.

     DOTXDX: When requested, it contains the Jacobian of the system.  It
     is a multidimensional array of size '2x2xnT'.

     U: If present, the function returns the inputs that generate the
     sequence of state space vectors provided in X.  To do this the
     functions estimates the second derivative of q using spline
     interpolation.  This implies that there be at least 2 observations
     of the state vector X, i.e.  'nT >= 2'.  Otherwise the output is
     empty.

     See also: setnloscillator, ppval, odepkg.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Implements a general nonlinear oscillator.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
pendulum


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1675
 -- Function File: [ DOTX, DOTXDX, U] = pendulum (T, X, OPT)
     Implements a general pendulum.

          q'' + (g/l)*sin(q) + d*q' = f(t,q,q')

     where q is the angle of the pendulum and q' its angular velocity

     This function can be used with the ODE integrators.

     *INPUTS*

     T: Time.  It can be a scalar or a vector of length 'nT'.

     X: State space vector.  An array of size '2xnT', where 'nT' is the
     number of time values given.  The first row corresponds to the
     configurations of the system and the second row to its derivatives
     with respect to time.

     OPT: An options structure.  See the complementary function
     'setpendulum'.  The structure containing the fields:

     'Coefficients': Contains the coefficients (g/l).

     'Damping': Contains the coefficient d.

     'Actuation': An optional field of the structure.  If it is present,
     it defines the function f(t,q,q').  It can be a handle to a
     function of the form f = func(T,X,OPT) or it can be a '1xnT'
     vector.

     *OUTPUT*

     DOTX: Derivative of the state space vector with respect to time.  A
     '2xnT' array.

     DOTXDX: When requested, it contains the Jacobian of the system.  It
     is a multidimensional array of size '2x2xnT'.

     U: If present, the function returns the inputs that generate the
     sequence of state space vectors provided in X.  To do this the
     functions estimates the second derivative of q using spline
     interpolation.  This implies that there be at least 2 observations
     of the state vector X, i.e.  'nT >= 2'.  Otherwise the output is
     empty.

     See also: setpendulum, nloscillator, odepkg.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Implements a general pendulum.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
principalaxes


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 446
 -- Function File: [AXES L MOMENTS] = principalaxes (SHAPE)
     Calculates the principal axes of a shape.

     Returns a matrix AXES where each row corresponds to one of the
     principal axes of the shape.  L is the second moment of area around
     the correspoding principal axis.  AXES is order from lower to
     higher L.

     SHAPE can be defined by a polygon or by a piece-wise smooth shape.

     See also: inertiamoment, masscenter.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Calculates the principal axes of a shape.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
quat2mat


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 124
 -- Function File: R = quat2mat (Q)
     This function is implemented in the quaternion package and will be
     deprecated.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 78
This function is implemented in the quaternion package and will be
deprecated.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
quatconj


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 684
copyright (c) 2011 Juan Pablocarbajal <carbajal@ifi.uzh.ch>
 
    This program is free software: youcan redistribute itand/or modify
    it under the terms of the GNU General Public Licenseas publishedby
    the Free Software Foundation, either version 3 of the License, or
   any later version.

    This program is distributed in the hope that it willbe useful,
   but WITHOUTaNY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FORa PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have receivedacopy of the GNU General Public License
   along with this program. If not, see <http://www.gnu.org/licenses/>.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
copyright (c) 2011 Juan Pablocarbajal <carbajal@ifi.uzh.ch>
 
    This progra...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
quatprod


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 684
copyright (c) 2011 Juan Pablocarbajal <carbajal@ifi.uzh.ch>
 
    This program is free software: youcan redistribute itand/or modify
    it under the terms of the GNU General Public Licenseas publishedby
    the Free Software Foundation, either version 3 of the License, or
   any later version.

    This program is distributed in the hope that it willbe useful,
   but WITHOUTaNY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FORa PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have receivedacopy of the GNU General Public License
   along with this program. If not, see <http://www.gnu.org/licenses/>.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
copyright (c) 2011 Juan Pablocarbajal <carbajal@ifi.uzh.ch>
 
    This progra...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
quatvrot


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 684
copyright (c) 2011 Juan Pablocarbajal <carbajal@ifi.uzh.ch>
 
    This program is free software: youcan redistribute itand/or modify
    it under the terms of the GNU General Public Licenseas publishedby
    the Free Software Foundation, either version 3 of the License, or
   any later version.

    This program is distributed in the hope that it willbe useful,
   but WITHOUTaNY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FORa PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have receivedacopy of the GNU General Public License
   along with this program. If not, see <http://www.gnu.org/licenses/>.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
copyright (c) 2011 Juan Pablocarbajal <carbajal@ifi.uzh.ch>
 
    This progra...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
rodmassmatrix


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1165
 -- Function File: [J SIGMA]= rodmassmatrix (SIGMA,L, RHO)
     Mass matrix of one dimensional rod in 3D.

     Let q be the configuration vector of the rod, with the first three
     elements of q being the spatial coordinates (e.g.  x,y,z) and the
     second three elements of q the rotiational coordinates (e.g.  Euler
     angles), then the kinetical energy of the rod is given by T = 1/2
     (dqdt)^T kron(J,eye(3)) dqdt

     SIGMA is between 0 and 1.  Corresponds to the point in the rod that
     is being used to indicate the position of the rod in space.  If
     SIGMA is a string then the value corresponding to the center of
     mass of the rod.  This makes J a diagonal matrix.  If SIGMA is a
     string the return value of SIGMA corresponds to the value pointing
     to the center of mass.

     L is the length of the rod.  If omitted the rod has unit length.

     RHO is a function handle to the density of the rod defined in the
     interval 0,1.  The integral of this density equals the mass and is
     stored in 'J(1,1)'.  If omitted, the default is a uniform rod with
     unit mass.

     Run 'demo rodmassmatrix' to see some examples.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Mass matrix of one dimensional rod in 3D.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
setnloscillator


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 211
 -- Function File: [ OPTS, DESC] = setnloscilator ()
     Returns the required options structure for the function
     nloscillator and a description of the fields in the structure.

     See also: nloscillator.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Returns the required options structure for the function nloscillator and
a de...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
setpendulum


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 200
 -- Function File: [ OPTS, DESC] = setpendulum ()
     Returns the required options structure for the function pendulum
     and a description of the fields in the structure.

     See also: pendulum.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Returns the required options structure for the function pendulum and a
descri...





