⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sfun_eom.tlc

📁 这也是一个关于导弹目标的Matlab程序
💻 TLC
字号:
%%%% Abstract: Derivative block target file.%implements sfun_eom "C"%% Function: InitializeConditions =============================================%% Abstract:%%%function InitializeConditions(block, system) Output  /* %<Type> Block: '%<Name>' */    %assign x0  = LibBlockContinuousState("", "", 0)  %assign x1  = LibBlockContinuousState("", "", 1)  %assign x2  = LibBlockContinuousState("", "", 2)  %assign x3  = LibBlockContinuousState("", "", 3)  %assign x4  = LibBlockContinuousState("", "", 4)  %assign x5  = LibBlockContinuousState("", "", 5)      %<x0> = 0.0;  %<x1> = 0.0;  %<x2> = 0.0;  %<x3> = 0.0;  %<x4> = 0.0;  %<x5> = 0.0;%endfunction %% Function: Outputs ==========================================================%% Abstract:%%%function Outputs(block, system) Output  /* %<Type> Block: '%<Name>' */  %assign x0  = LibBlockContinuousState("", "", 0)  %assign x1  = LibBlockContinuousState("", "", 1)  %assign x2  = LibBlockContinuousState("", "", 2)  %assign x3  = LibBlockContinuousState("", "", 3)  %assign x4  = LibBlockContinuousState("", "", 4)  %assign x5  = LibBlockContinuousState("", "", 5)    %assign y0 = LibBlockOutputSignal(0, "", "", 0)  %assign y1 = LibBlockOutputSignal(0, "", "", 1)  %assign y2 = LibBlockOutputSignal(0, "", "", 2)  %assign y3 = LibBlockOutputSignal(0, "", "", 3)  %assign y4 = LibBlockOutputSignal(0, "", "", 4)  %assign y5 = LibBlockOutputSignal(0, "", "", 5)  %<y0> = %<x0>;  %<y1> = %<x1>;  %<y2> = %<x2>;  %<y3> = %<x3>;  %<y4> = %<x4>;  %<y5> = %<x5>;  %endfunction%% Function: Derivatives ===========================================================%% Abstract:%%      Update the oldest bank of last inputs%%%function Derivatives(block, system) Output  /* %<Type> Block: '%<Name>' */  %assign x0  = LibBlockContinuousState("", "", 0)  %assign x1  = LibBlockContinuousState("", "", 1)  %assign x2  = LibBlockContinuousState("", "", 2)  %assign x3  = LibBlockContinuousState("", "", 3)  %assign x4  = LibBlockContinuousState("", "", 4)  %assign x5  = LibBlockContinuousState("", "", 5)  %assign u0 = LibBlockInputSignal(0, "", "", 0)  %assign u1 = LibBlockInputSignal(0, "", "", 1)  %assign u2 = LibBlockInputSignal(0, "", "", 2)  %assign u3 = LibBlockInputSignal(0, "", "", 3)  %assign u4 = LibBlockInputSignal(0, "", "", 4)  %assign u5 = LibBlockInputSignal(0, "", "", 5)  %assign u6 = LibBlockInputSignal(0, "", "", 6)  %assign u7 = LibBlockInputSignal(0, "", "", 7)  %assign u8 = LibBlockInputSignal(0, "", "", 8)  %assign u9 = LibBlockInputSignal(0, "", "", 9)  %<LibBlockContinuousStateDerivative("","",0)> = %<u4>/%<u3> - %<x2>*%<x4> + %<x1>*%<x5>;   %<LibBlockContinuousStateDerivative("","",1)> = %<u5>/%<u3> - %<x0>*%<x5> + %<x2>*%<x3>;  %<LibBlockContinuousStateDerivative("","",2)> = %<u6>/%<u3> - %<x1> + %<x0>*%<x4>;  %<LibBlockContinuousStateDerivative("","",3)> = (%<u7> - (%<u2>-%<u1>)*%<x4>*%<x5>)/%<u0>;  %<LibBlockContinuousStateDerivative("","",4)> = (%<u8> - (%<u0>-%<u2>)*%<x5>*%<x3>)/%<u1>;  %<LibBlockContinuousStateDerivative("","",5)> = (%<u9> - (%<u1>-%<u0>)*%<x3>*%<x4>)/%<u2>;     %endfunction%% [EOF] deriv.tlc

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -