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

📄 input.java

📁 分别是模糊识别、模糊聚类、模糊控制的实例代码
💻 JAVA
字号:
package fuzzy_control;

public class Input {
    private int offset;
    private double Input_Matrix[][];
    private double distance[][];

    Input(double[][] dis)
    {
        Input_Matrix=new double[1][7];
        distance=dis;
    }

    public double[][] Input_Fuzzy(int o)
    {
       offset=o;
       if(offset<=-1&&offset>-5)
       {
          for(int i=0;i<7;i++)
          Input_Matrix[0][i]=distance[0][i];
       }
       if(offset<=-5&&offset>-15)
       {
         for(int i=0;i<7;i++)
            Input_Matrix[0][i]=distance[1][i];
        }
        if(offset<=-15&&offset>-25)
        {
          for(int i=0;i<7;i++)
            Input_Matrix[0][i]=distance[2][i];
        }
        if((offset<=-25&&offset>=-30)||(offset<=30&&offset>25))
        {
          for(int i=0;i<7;i++)
            Input_Matrix[0][i]=distance[3][i];
        }
        if(offset<=25&&offset>15)
        {
          for(int i=0;i<7;i++)
            Input_Matrix[0][i]=distance[4][i];
        }
        if(offset<=15&&offset>5)
        {
          for(int i=0;i<7;i++)
            Input_Matrix[0][i]=distance[5][i];
        }
        if(offset<=5&&offset>1)
        {
          for(int i=0;i<7;i++)
            Input_Matrix[0][i]=distance[6][i];
        }
        return Input_Matrix;
      }
}

⌨️ 快捷键说明

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