From 6187aede8dc13a4fc4d5fd5463574955d702d7f4 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Tue, 19 Nov 2024 13:00:14 -0500 Subject: initial release --- sympmat.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sympmat.m (limited to 'sympmat.m') diff --git a/sympmat.m b/sympmat.m new file mode 100644 index 0000000..9eb84db --- /dev/null +++ b/sympmat.m @@ -0,0 +1,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 + -- cgit v1.2.3