c++标准输入输出流(四)

这里写图片描述

#include <iostream>
#include <fstream>
#include <cstring>

using namespace std;

class wordtype
{
    char word[20];
    int count;
};

int getwords(wordtype *w)
{
     ifstream in("words.text");
     int n,m = 0;
     char word[20];
     while(in)
    {
        in >> word;
        if(!in) break;
        bool flag = 0;
        for(;m < n;m ++)
        {
            if(!strcmp(word,word[m].word))
            {
                words[m].count ++;
                flag = true;
                break;
            }
        }
        if(!flag)
            {
                words[m].count = 1;
                strcpy(words[m].word,word);
                n ++;
            }
    }
    return n;
}

int main(int argc, char const *argv[])
{    
    wordtype words[100] = {"",0};
    int n = getwords(words);
    cout << "Result:" << endl;
    for(int m = 0; m < n ; m ++)
    {
        cout << words[m].word << ':' << words[m].count << endl;
    }
    cout << "Totally:" << n << endl;
    return 0;
}
Observers in Control Systems - A Practical GuideObservers in Control Systems ?..........................................Acknowledgments xi..............................................................Safety xiii..................................................................................1 Control Systems and the Role of Observers 1................1.1 Overview 1...................................................................................1.2 Preview of Observers 2...............................................................1.3 Summary of the Book 4...............................................................2 Control-System Background 5..........................................2.1 Control-System Structures 5.......................................................2.2 Goals of Control Systems 13.........................................................2.3 Visual ModelQ Simulation Environment 17...................................2.4 Software Experiments: Introduction to Visual ModelQ 18.............2.5 Exercises 39..................................................................................3 Review of the Frequency Domain 41..................................3.1 Overview of the s-Domain 41........................................................3.2 Overview of the z-Domain 54........................................................3.3 The Open-Loop Method 59...........................................................3.4 A Zone-Based Tuning Procedure 62.............................................3.5 Exercises 66..................................................................................4 The Luenberger Observer: Correcting SensorProblems 67.............................................................................4.1 What Is a Luenberger Observer? 67.............................................4.2 Experiments 4A-4C: Enhancing Stability with an Observer 72......4.3 Predictor-Corrector Form of the Luenberger Observer............4.4 Filter Form of the Luenberger Observer 78...................................4.5 Designing a Luenberger Observer 82...........................................4.6 Introduction to Tuning an Observer Compensator 90...................4.7 Exercises 95..................................................................................5 The Luenberger Observer and Model Inaccuracy 97........5.1 Model Inaccuracy 97.....................................................................5.2 Effects of Model Inaccuracy 100.....................................................5.3 Experimental Evaluation 102...........................................................5.4 Exercises 114..................................................................................6 The Luenberger Observer and Disturbances 115...............6.1 Disturbances 115.............................................................................6.2 Disturbance Response 123.............................................................6.3 Disturbance Decoupling 129...........................................................6.4 Exercises 138..................................................................................7 Noise in the Luenberger Observer 141................................7.1 Noise in Control Systems 141.........................................................7.2 Sensor Noise and the Luenberger Observer 145............................7.3 Noise Sensitivity when Using Disturbance Decoupling 156............7.4 Reducing Noise Susceptibility in Observer-Based Systems 161....7.5 Exercises 170..................................................................................8 Using the Luenberger Observer in Motion Control 173......8.1 The Luenberger Observers in Motion Systems 173........................8.2 Observing Velocity to Reduce Phase Lag 185................................8.3 Using Observers to Improve Disturbance Response...............8.4 Exercises 212..................................................................................References 213..........................................................................A Observer-Based Resolver Conversion in IndustrialServo Systems1 217.................................................................B Cures for Mechanical Resonance in IndustrialServo Systems1 227.................................................................Introduction 227.....................................................................................Two-Part Transfer Function 228............................................................Low-Frequency Resonance 229............................................................Velocity Control Law 230.......................................................................Methods of Correction Applied to Low-Frequency Resonance 231......Conclusion 235......................................................................................Acknowledgments 235..........................................................................References 235.....................................................................................C European Symbols for Block Diagrams 237.......................Part I: Linear Functions 237..................................................................Part II: Nonlinear Functions 238............................................................D Development of the Bilinear Transformation 241...............Bilinear Transformation 241..................................................................Prewarping 242.....................................................................................Factoring Polynomials 243....................................................................Phase Advancing 243............................................................................Solutions to Exercises 245.......................................................Chapter 2........................................................................................Chapter 3 245........................................................................................Chapter 4 246........................................................................................Chapter 5 246........................................................................................Chapter 6 247........................................................................................Chapter 7 248........................................................................................Chapter 8 249........................................................................................Index 251....................................................................................
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值