{ "name": "COSBLK_f", "description": "Cosine function block - computes the cosine of the input signal", "category": "Math Operations/Trigonometry", "blockType": "c", "tag": "BasicBlock", "interfaceFunctionName": "COSBLK_f", "simulationFunctionName": "cosblk", "simulationFunctionType": "DEFAULT", "dependsOnU": 1, "dependsOnT": 0, "geometry": { "width": 40, "height": 40 }, "parameters": { "exprs": { "height": 0, "width": 0, "type": "ScilabDouble" }, "realParameters": { "height": 0, "width": 0, "type": "ScilabDouble" }, "integerParameters": { "height": 0, "width": 0, "type": "ScilabDouble" }, "objectsParameters": { "type": "ScilabList" }, "nbZerosCrossing": { "height": 1, "width": 1, "type": "ScilabInteger", "intPrecision": "sci_int32", "value": 0 }, "nmode": { "height": 1, "width": 1, "type": "ScilabInteger", "intPrecision": "sci_int32", "value": 0 }, "state": { "height": 0, "width": 0, "type": "ScilabDouble" }, "dState": { "height": 0, "width": 0, "type": "ScilabDouble" }, "oDState": { "type": "ScilabList" }, "equations": { "type": "ScilabList" } }, "ports": { "explicitInputs": [ { "ordering": 1, "dataType": "REAL_MATRIX", "dataColumns": 1, "dataLines": -1, "initialState": 0.0, "style": "ExplicitInputPort;align=left;verticalAlign=middle;spacing=10.0;rotation=0", "value": "" } ], "explicitOutputs": [ { "ordering": 1, "dataType": "REAL_MATRIX", "dataColumns": 1, "dataLines": -1, "initialState": 0.0, "style": "ExplicitOutputPort;align=right;verticalAlign=middle;spacing=10.0;rotation=0", "value": "" } ], "implicitInputs": [], "implicitOutputs": [], "controls": [], "commands": [] }, "xmlExample": "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n", "anomalies": [ "Empty exprs (height=0,width=0) - no parameters", "dataLines=-1 for variable-size input/output", "DEFAULT simulation function type (not C_OR_FORTRAN)", "Simple trigonometric block with no state" ], "criticalRules": [ "Use DEFAULT simulationFunctionType", "Preserve empty parameter structure", "Output port style must include rotation=0" ], "commonUses": [ "Signal processing - convert phase to amplitude", "Oscillator circuits - combine with sine for quadrature", "Trigonometric calculations", "Phase-locked loops" ], "relatedBlocks": [ "SINBLK_f", "TANBLK_f", "TrigFun" ] }