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

📄 intr.m

📁 some simulation of dtc coommand my name is belmhel ahmed my tel 0797611456
💻 M
字号:
function [sys,x0,str,ts]=zon(t,x,u,flag)
%dispath the flag.the switch function controls the calls to
%s_function routines at each simulation stage.
switch flag,
case 0
sizes=simsizes;
sizes.NumContStates=0;
sizes.NumDiscStates=0;
sizes.NumOutputs=3;
sizes.NumInputs=3;
sizes.DirFeedthrough=1;
sizes.NumSampleTimes=1;
sys=simsizes(sizes);
x0=[];
str=[];
ts=[-1 0];
    case 3
V1=[0 0 0];
V2=[1 0 0];
V3=[1 1 0];
V4=[0 1 0];
V5=[0 1 1];
V6=[0 0 1];
V7=[1 0 1];
V8=[1 1 1];
%affichage des grandeur d entree
ccpl=u(1);
cflx=u(2);
 N=u(3);
    
                    if ccpl==1 & cflx==1 & N==1
    sys=V3
                    end
                if ccpl==1 & cflx==1 & N==2
    sys=V4
    end
                if ccpl==1 & cflx==1 & N==3
    sys=V5
         end 
                if ccpl==1 & cflx==1 & N==4
    sys=V6
    end
                if ccpl==1 & cflx==1 & N==5
    sys=V7
    end
                if ccpl==1 & cflx==1 & N==6
    sys=V2
    
                end       
         if ccpl==1 & cflx==0 & N==1
    sys=V4
    end
                if ccpl==1 & cflx==0 & N==2
    sys=V5
    end
                if ccpl==1 & cflx==0 & N==3
    sys=V6
    end
                if ccpl==1 & cflx==0 & N==4
    sys=V7
    end
                if ccpl==1 & cflx==0 & N==5
    sys=V2
    end
             if ccpl==1 & cflx==0 & N==6
    sys=V3
    end
                if ccpl==0 & cflx==1 & N==1
    sys=V1
    end
                if ccpl==0 & cflx==1 & N==2
    sys=V1
    end
                if ccpl==0 & cflx==1 & N==3
    sys=V1
    end
                if ccpl==0 & cflx==1 & N==4
    sys=V1
    end
                if ccpl==0 & cflx==1 & N==5
    sys=V1
    end
                if ccpl==0 & cflx==1 & N==6
    sys=V1
    end
                if ccpl==0 & cflx==0 & N==1
    sys=V8
    end
                if ccpl==0 & cflx==0 & N==2
    sys=V8
    end
                if ccpl==0 & cflx==0 & N==3
    sys=V8
    end
                if ccpl==0 & cflx==0 & N==4
    sys=V8
    
                end     
        if ccpl==0 & cflx==0 & N==5
    sys=V8
    
        end    
         if ccpl==0 & cflx==0 & N==6
    sys=V8
                    end
case {1, 2, 4, 9}
sys=[];
    otherwise
error(['Unhandled flag=',num2str(flag)]);
end;
         

⌨️ 快捷键说明

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