Cos

block Cos "Output the cosine of the input"
    extends Interfaces.ComplexSISO;
equation
    y = Modelica.ComplexMath.cos(uInternal);

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Polygon(
                    points = {
                        {-80, 90}, 
                        {-88, 68}, 
                        {-72, 68}, 
                        {-80, 90}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Line(
                    points = {
                        {-80, -80}, 
                        {-80, 68}},
                    color = {192, 192, 192}), 
                Line(
                    points = {
                        {-90, 0}, 
                        {68, 0}},
                    color = {192, 192, 192}), 
                Polygon(
                    points = {
                        {90, 0}, 
                        {68, 8}, 
                        {68, -8}, 
                        {90, 0}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Line(
                    points = {
                        {-80, 80}, 
                        {-74.4, 78.1}, 
                        {-68.7, 72.3}, 
                        {-63.1, 63}, 
                        {-56.7, 48.7}, 
                        {-48.6, 26.6}, 
                        {-29.3, -32.5}, 
                        {-22.1, -51.7}, 
                        {-15.7, -65.3}, 
                        {-10.1, -73.8}, 
                        {-4.42, -78.8}, 
                        {1.21, -79.9}, 
                        {6.83, -77.1}, 
                        {12.5, -70.6}, 
                        {18.1, -60.6}, 
                        {24.5, -45.7}, 
                        {32.6, -23}, 
                        {50.3, 31.3}, 
                        {57.5, 50.7}, 
                        {63.9, 64.6}, 
                        {69.5, 73.4}, 
                        {75.2, 78.6}, 
                        {80, 80}},
                    color = {85, 170, 255}), 
                Text(
                    extent = {
                        {-36, 82}, 
                        {36, 34}},
                    textColor = {192, 192, 192},
                    textString = "cos")}),
        Documentation(info = "<html>\n<p>\nThis blocks computes the output <code>y</code>\nas <strong>cos</strong> of the input <code>u</code>. Optionally, the input <code>u</code> can be processed conjugate complex, when parameter <code>useConjugateInput</code> is <code>true</code>. Depending on <code>useConjugateInput</code> the internal signal <code>uInternal</code> represents either the original or the conjugate complex input signal.\n</p>\n<blockquote><pre>\ny = <strong>cos</strong>(uInternal);\n</pre></blockquote>\n\n<p>\n<img src=\"modelica://Modelica/Resources/Images/Math/cos.png\"\n     alt=\"cos.png\">\n</p>\n\n</html>"));
end Cos;