# doc-cache created by Octave 4.4.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: 1304
 -- Function File: OUTPUT = EAmatrix (ANGLES, CONVENTION)
     Generates the Eulerangle rotation matrix in the given convention.

     Using the equivalence between Euler angles and rotation
     composition, it is possible to change to and from matrix
     convention.  Fixed (world)axes and column vectors, with intrinsic
     composition (composition of rotations about body axes) ofactive
     rotationsand the right-handed rule for the positive sign of the
     angles are assumed.  This means for example that a convention named
     (YXZ) is the result of performing firstan intrinsic Y rotation,
     followedbyan Xanda Z rotations, in the moving axes.

     Subindexes refer to the order in which theangles are applied.
     Trigonometric notation hasbeen simplified.  For example,c1
     meanscos(θ1)and s2 means sin(θ2).as we assumed intrinsic and
     active compositions, θ1 is the external angle of the static
     definition (angle between fixed axis x and line of nodes) and θ3
     the internal angle (from the line of nodes to rotated axis X). The
     following table can be used both ways, to obtainan orientation
     matrix from Euler angles and to obtain Euler angles from the
     matrix.  The possible combinations of rotations equivalent to Euler
     angles are shown here.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Generates the Eulerangle rotation matrix in the given convention.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 123
 -- Function File: DQDT = RBequations_rot (T, Q, OPT)
     Rotational equations of motion of rigid body fixed in one point.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
Rotational equations of motion of rigid body fixed in one point.



# 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
interacting p



# 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: 68
 -- Function File: QC = quatconj (Q)
     Conjugate of a quaternion.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
Conjugate of a quaternion.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
 -- Function File: Q3 = quatprod (Q1, Q2)
     Product of two quaternions.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Product of two quaternions.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 87
 -- Function File: VN = quatvrot (V, Q)
     Rotate vector v accoding to quaternionr q.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
Rotate vector v accoding to quaternionr q.



# 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 descr



# 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
descripti





