X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=blobdiff_plain;f=scilab%2Fmodules%2Fcacsd%2Ftests%2Funit_tests%2Fsylv.dia.ref;h=dc28ac3a6944b6e06a0c6d2e744ee6e2ddf4d463;hp=4efb1061f3e4b7b43c28f0b01e9c13605d14f04d;hb=1e134f3b637372995148ae832cb352761f4101ac;hpb=91ceb93c93edf78d1cc4331514ec5fab1b9ca318 diff --git a/scilab/modules/cacsd/tests/unit_tests/sylv.dia.ref b/scilab/modules/cacsd/tests/unit_tests/sylv.dia.ref index 4efb106..dc28ac3 100644 --- a/scilab/modules/cacsd/tests/unit_tests/sylv.dia.ref +++ b/scilab/modules/cacsd/tests/unit_tests/sylv.dia.ref @@ -8,9 +8,12 @@ // Run with test_run('cacsd', 'sylv', ['no_check_error_output']); A = rand(4, 4); C = rand(4, 3); B = rand(3, 3); // Solve continuous-time Sylvester equation: A*X+X*B = C -X = sylv(A, B, C, 'c'); +X = sylv(A, B, C, "c"); expected_norm = 1.D-16; if norm(A*X+X*B-C)-expected_norm > 1.D-15 then bugmes();quit;end -// Solve discrete-time Sylvester equation: A*X*B+X = C -X = sylv(A, B, C, 'd'); +// Solve modified discrete-time Sylvester equation: A*X*B+X = C +X = sylv(A, B, C, "d"); if norm(A*X*B+X-C)-expected_norm > 1.D-15 then bugmes();quit;end +// Solve real discrete-time Sylvester equation: A*X*B+X = C +X = -sylv(-A, B, C, "d"); +if norm(A*X*B-X-C)-expected_norm > 1.D-15 then bugmes();quit;end