Mathematics, Optimization |
| Submitted by mike on Sun, 2009-01-11 19:20 |
Any tips of Matlab or Mathematica usage as well as general code should go here.
We can also put general information on optimization algorithms such as SVD / SVM / Genetic Algorithms / Neural Nets / LWR here.
Libraries
- Stony Brook Algorithm Repository: collection of algorithms and libraries
- BLAS: Basic Linear Algebra Subroutines
- LAPACK: Linear Algebra Package
- SPRNG: Scalable Parallel Random Number Generator (ubuntu package: libsprng2)
- FANN: Fast Artificial Neural Nets
Deriving Dynamics of the Two-Wheel Manipulator (Using Lagrangian Approach)
-
I tried to derive the dynamics of the two-wheel manipulator using Lagrangian approach and transform it to the state space representation. Since the derivation is really messy, using Mathematica is a good way to get the dynamics systematically and symbolically. Here I found some useful tips about Mathematica that I want to share
- Be careful when using a subscript in the variable. Sometimes Mathematica will think that the subscript itself is not actually a subscript but a function variable. For example, let
where
is a variable and
is a constant. Suppose we take the derivative of
with respect to
, we should get
. However, actually D[x,t]
which is not what we expected. The problem can be solved by changing the subscript
to something else or just not using a subscript.
- When we need to calculate the norm of a vector
. Let's say
. Using Norm[], sometimes may not be good since
Norm[v]
. The absolute value will give us a problem when we want to simplify the expression. Instead, find another way to define a norm e.g. use a dot product Sqrt[v.v]
. This will allow us to avoid the absolute sign.







