summaryrefslogtreecommitdiff
path: root/sympmat.m
blob: 9eb84db3032cacc2ab401f50d5a386214c166f79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function omega = sympmat(n)
    % Create a symplectic form matrix
    % Note that it is assumed that the symplectic form is
    %
    %.. math:: \Omega = \begin{bmatrix}0&I\\-I&0\end{bmatrix}
    %
    % where :math:`I` is the identity matrix and :math:`0` is the zero matrix.
    I = eye(n);
    Z = zeros(n);
    omega = [Z I; -I Z];
end