diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-11-21 10:07:58 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-11-21 10:07:58 -0500 |
commit | f1794c3de4c738cb06161cdca61353198656da0a (patch) | |
tree | 0b224e02166f64af8d9a62d06de1153d04cad033 /xxpp_to_xpxp.m | |
parent | c3f621e6437662d68485bd41f724424325327cf9 (diff) | |
download | matlab_strawberryfields-f1794c3de4c738cb06161cdca61353198656da0a.tar.gz matlab_strawberryfields-f1794c3de4c738cb06161cdca61353198656da0a.zip |
Diffstat (limited to 'xxpp_to_xpxp.m')
-rw-r--r-- | xxpp_to_xpxp.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xxpp_to_xpxp.m b/xxpp_to_xpxp.m index d6efbe9..f77e954 100644 --- a/xxpp_to_xpxp.m +++ b/xxpp_to_xpxp.m @@ -28,3 +28,14 @@ function S_permuted = xxpp_to_xpxp(S) end end +%!test +%! [X, Y]=meshgrid (1:4, 1:4); +%! Mxpxp=xxpp_to_xpxp(X); +%! assert(any(any(X != Mxpxp))); +%! Mxxpp=xpxp_to_xxpp(Mxpxp); +%! assert(X, Mxxpp) +%! Mxpxp=xxpp_to_xpxp(Y); +%! assert(any(any(Y != Mxpxp))); +%! Mxxpp=xpxp_to_xxpp(Mxpxp); +%! assert(Y, Mxxpp) + |