question.cpp

来自「matlab 专业设计 源于课本的原文件 适合于编程人员」· C++ 代码 · 共 27 行

CPP
27
字号
// Embedded Control Systems in C/C++
// by Jim Ledin
//
// Chapter 9 - Answers to Self-Test question 1

void main()
{
    // Determine initial states

    // Call the controller's Initialize function

    int n = 0; // Update counter

    // Start the real time clock counting from zero

    for (;;)
    {
        // Read the controller inputs U

        // Call the controller's Update function

        // Write the controller outputs Y

        ++n;
        // Delay until time = n * h
    }
}

⌨️ 快捷键说明

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