亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? plotpoly.m

?? 一個matlab的將軍模型
?? M
字號:
function plotpoly
% Function  	: PlotPoly                          
% Credate   	: 07/20/1999		                  
% CURDATE		: 11/05/2001   
% Description	: This function draws the polytope related with 
%                each  location  reachable  from  the initial 
%                locations, using GLOBAL_TRANSITIONS structure
% Obs.: It only works for dimension 2 or 3.


% record initial time stamp
time = cputime;

% using all data from data structure
global_var;

% clear figure and make initial arrangements to plot
clf;
hold on;

%  Load  GLOBAL_PIHA.InitialLocation to initloc                         %
for k=1:length(GLOBAL_PIHA.InitialConditions)
    initloc = GLOBAL_PIHA.InitialConditions{k}.initialLocation;
end

%  Plot polytopes of initloc using GLOBAL_AUTOMATON    						%

hold on ;
for i=initloc
    for j=1:length(GLOBAL_AUTOMATON{i}.initstate)
        plot(GLOBAL_AUTOMATON{i}.initstate{j}.polytope)
    end
end
END = 0;

actloc   = unique(initloc);
nextloc  = [];
plotloc  = [];
counter  = 1;
oldloc   = [];
omniloc = unique(initloc);

%  Plot 'tree' of polytopes using GLOBAL_AUTOMATON    						%
while  ~END
   for i=1:length(actloc)
     plotloc = [plotloc GLOBAL_TRANSITION{actloc(i)}];   
   end
   plotloc = unique(setdiff(plotloc,omniloc));
   omniloc  = unique([omniloc plotloc]);
   if isempty(plotloc)
      END =1;
   else
  		actloc  = plotloc;
      plotloc= [];
      counter = counter + 1;
      fprintf(1,'Depth #%4.0f \n',counter)
      fprintf('Drawing  polytopes, please wait... ');%
      for i=1:length(actloc)
         var_location 	= GLOBAL_XSYS2AUTO_MAP{actloc(i)}(1);
  		 if ~(strcmp(var_location,'terminal'))& ~(strcmp(var_location,'out_of_bound'))&...
            ~(strcmp(var_location,'time_limit'));
   			var_cell			= GLOBAL_XSYS2AUTO_MAP{actloc(i)}(2);
            var_state		= GLOBAL_XSYS2AUTO_MAP{actloc(i)}(3);
            hold on;
            plot(GLOBAL_AUTOMATON{var_location}.interior_region{var_cell}.state{var_state}.polytope,[1 0 0]);
            for k=1:length(GLOBAL_AUTOMATON{var_location}.interior_region{var_cell}.state{var_state}.mapping)
               % plot(GLOBAL_AUTOMATON{var_location}.interior_region{var_cell}.state{var_state}.mapping{k},[0 0 1]);
            end
            %ause
        elseif (strcmp(var_location,'out_of_bound'))
            fprintf('Location %4.0f is out_of_bound\n',actloc(i));
 				%save locat actloc;
        end
      end
      fprintf('done! \n');
      pause;
  end
end
nextloc = omniloc;
Elapsed_time = cputime - time



% SECOND PART
% This part was used to draw flowpipes. It's not used anymore
if 0
   
% Initializing data from system dynamics.
A_plus =[ -3.3216            -25.736            0.0;...
          25.736              -3.3216           0.0;...
           3.14631            -5.10887    0.0];

A_minus =[-3.3216           -25.736            0.0;...
          25.736             -3.3216           0.0;...
           3.14631            -5.10887    0.0];

B = [263.824;-349.729;29378];
T = 0.002;
N = 4;
Ninterval = 10;
hard_calc= 0; 
   
fprintf('Press any key to draw flowpipe...\n');
pause
fprintf('Drawing  flowpipes, please wait... \n');
for i=1:length(nextloc)
  var_location 	= GLOBAL_XSYS2AUTO_MAP{nextloc(i)}(1);
  if ~(strcmp(var_location,'terminal'))
      if ismember(var_location,GLOBAL_XSYS2AUTO_MAP{GLOBAL_PIHA.InitialLocations}(1))
   		X0=GLOBAL_AUTOMATON{i}.initstate{length(GLOBAL_AUTOMATON{i}.initstate)}.polytope;		
      else   
       	var_cell			= GLOBAL_XSYS2AUTO_MAP{nextloc(i)}(2);
      	var_state		= GLOBAL_XSYS2AUTO_MAP{nextloc(i)}(3);
     		X0=GLOBAL_AUTOMATON{var_location}.interior_region{var_cell}.state{var_state}.polytope;
      end
      [AM,b] = overall_system_matrix(GLOBAL_PIHA.SCSBlocks, ...
        GLOBAL_PIHA.Locations{var_location}.q);
  		if rank(AM) == size(AM,1)
		  Ainv = inv(AM);
		else
		  Ainv = [];
		end
      inv = location_invariant(var_location);
      [CE,dE,CI,dI] = linearcon_data(inv);
      [Xsim,Tstamp,Telapsed]= compute_flow_sim(AM,Ainv,b,X0,inv,T);
      Xini = X0;
      Vini = vertices(Xini);
    	eAT = expm(AM*Telapsed/Ninterval);
 		displacement = step_response(AM,Ainv,b,Telapsed/Ninterval);
      for k = 1:Ninterval
    		Vk = transform(Vini,eAT,displacement);
    		Xk = transform(Xini,eAT,displacement);
         CH = polyhedron(Vini|Vk);
         plot(CH,[0.5 0.7 0.6]);
         Vini = Vk;
         Xini = Xk;
      end
      if ~hard_calc
      	eAT = expm(AM*Tstamp);
 			displacement = step_response(AM,Ainv,b,Tstamp);
      	Xpoly  = transform(Xsim,eAT,displacement);
         REG2 	 = polyhedron(vertices(Xsim)|vertices(Xpoly));
         CI 	 = get_param(REG2,'CI'); 
         dI 	 = get_param(REG2,'dI'); 
         REG	 = linearcon([],[],CI,dI);
      else
         REG = psim_lin(AM,b,Xsim,Tstamp,1);
      end
     	for j=1:length(REG)
        	plot(inv&REG(j),[.7 .7 .6]);%[i*0.0005 j*0.2 0.8])
      end
	end
   fprintf(1,'Iteration # %4.0f \n',i)
end
fprintf('done! \n');
pause
end

return
% -----------------------------------------------------------------------------

function [Xsim,Tstamp,Telapsed] = compute_flow_sim(A,Ainv,b,X0,inv,T)

% simulate the dynamics  for each vertice, finding the new set of points
% where vector field leaves the invariant. Only for a `linear` dynamics.
%
% Syntax:
%   "[Xsim,Tstamp] = compute_flow_sim(A,Ainv,b,X0,CI,dI,T)"
%
% Description:
%   Simulate each vertice, approximating the time when trajectory crosses
%   any hyperplane. Returns:
%
%   - The new vertices (For the time when first trajectory hits a hyperplane)
%   
%   - Time stamp between the first and the last crossing of any hyperplane
%
%    The inputs to this function are
%
%   * "A": the system matrix
%
%   * "Ainv": the inverse of "A" if it exists, otherwsie it should be
%     "[]"
%
%   * "b": constant input vector for the affine dynamics
%
%   * "X0": a "linearcon" object represeting the initial set
%
%   * inv: invariant (linearcon object)
%
%   * "T": the time step for the trajectory
%
%   The output "Xsim" is a "linearcon" object,(a polytope) representing the
%   transformed segment approximation. "Tstamp" is a real number recording the
%   time stamp for the flowpipe which englobes the intersection region with 
%   the invariant.
%
% Implementation:
%   To approximate the segment, we do the following:
%   
%   1) simulate the points until the first trajectory hits a hyperplane. 
%      Record the value of the vertices at that time and also the time value.
%
%   2) continue simulation until the last trajectory  hits a hyperplane.
%      Record the time value.
%
%    The simulation of each point uses the following expression:
%
%   "x(T) = e^{A*T}*x(0) + inv(A)*(e^{A*T} - I)*b"
%
% See Also:
%   stretch_func_lin,step_response,psim_lin,fs_lin_map,linearcon,transform,
%   clean_up

timing = 0;
init_T = T;
max_counter = 5;
status=[];%approx_param.max_bissection;
%eAT 	 = expm(A*T);
%displacement = step_response(A,Ainv,b,T);

% Transfrom sample points by eAT
crossing = 0;
bissection_counter = 0;

status  = check_crossing(X0,inv);
if strcmp(status,'outside') | strcmp(status,'partially')
   crossing = 1;
   bissection_counter = max_counter;
   fprintf(1,'initial set has 1 or more vertices outside (or in the border) of the invariant\n')
end
while (~crossing) | (bissection_counter <= max_counter)
	eAT 	 = expm(A*T);
	displacement = step_response(A,Ainv,b,T);
   Xt = transform(X0,eAT,displacement);
   % Check if any point cross a hyperplane
   status = check_crossing(Xt,inv);
   if strcmp(status,'inside')
   	X0 = Xt;   
      crossing = 0;
      timing = timing + T;
   else
      crossing = 1;
      T = T/2;
      bissection_counter = bissection_counter + 1;
   end
end
Telapsed = timing;
Xsim = X0;
T = init_T;
all_crossing = 0;
bissection_counter = 0;
time_stamp = 0;
while (~all_crossing) | (bissection_counter <= max_counter)
	eAT 	 = expm(A*T);
	displacement = step_response(A,Ainv,b,T);
   Xt = transform(X0,eAT,displacement);
   % Check if all point cross a hyperplane
   status = check_crossing(Xt,inv);
   if strcmp(status,'outside')
      all_crossing = 1;
      bissection_counter = bissection_counter + 1;
      if (bissection_counter > max_counter)
         time_stamp = time_stamp + T;
      end
      T = T/2;
   else
      X0 = Xt;
      time_stamp = time_stamp + T;
      all_crossing = 0;
   end
end
Tstamp = time_stamp;

return

% -----------------------------------------------------------------------------

function status = check_crossing(Xt,inv)

% Check whether any point of Vt cross the boundary of the invariant INV.
%
% Xt               : Region to be tested (linearcon object)
% inv              : Invariant.
% 
% Returns:
%
% status				: An string informing if the whole set is "inside","outside" or "partially".
%						  status returns 'error' whether Xt or inv is empty.

if isempty(Xt) | isempty(inv)
   status = 'error';
   fprintf(1,'Check_crossing routine: invariant or region is empty \n')
else
   if ~isfeasible(Xt,inv)
   	status = 'outside';
	elseif isempty(minus(Xt,Xt&inv))
      status = 'inside';
   else     
      status = 'partially';
   end
end     
return

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产无一区二区| 4438亚洲最大| 亚洲欧美日韩人成在线播放| 成人午夜激情视频| 亚洲日本青草视频在线怡红院| 不卡的av中国片| 最近日韩中文字幕| 欧美性受极品xxxx喷水| 亚洲gay无套男同| 日韩免费在线观看| 国产在线精品免费av| 中文字幕成人在线观看| 91免费看片在线观看| 亚洲图片有声小说| 欧美第一区第二区| 成人av资源在线观看| 亚洲一区在线观看网站| 日韩欧美中文字幕公布| 国产精品一区二区果冻传媒| 国产精品久久精品日日| 欧美日韩午夜影院| 国产揄拍国内精品对白| 亚洲男人电影天堂| 欧美变态tickle挠乳网站| 国产999精品久久| 一区二区三区高清不卡| 亚洲精品一区二区三区蜜桃下载 | 午夜精品久久久久久久久| 3d动漫精品啪啪一区二区竹菊| 国产一区二三区好的| 亚洲日本丝袜连裤袜办公室| 91精品国产91综合久久蜜臀| 成人免费视频视频在线观看免费| 亚洲女人****多毛耸耸8| 91麻豆精品国产| 成人精品一区二区三区中文字幕| 亚洲6080在线| 成人免费一区二区三区视频| 欧美一区二区三区四区久久| 成人黄色一级视频| 久久99精品久久久| 一区二区三区成人| 日本一区免费视频| 欧美一区二区三区在线观看| 99麻豆久久久国产精品免费优播| 日韩有码一区二区三区| 亚洲人一二三区| 久久久久国产精品麻豆| 欧美高清视频在线高清观看mv色露露十八 | 免费欧美在线视频| 亚洲精品免费在线观看| 久久综合九色欧美综合狠狠| 欧美色综合久久| 99精品欧美一区二区蜜桃免费| 久久99国产精品麻豆| 五月天激情小说综合| 亚洲视频一区二区在线观看| 久久精品一区二区三区不卡牛牛| 91精品国产综合久久婷婷香蕉 | 久久久久久久综合色一本| 欧美日韩不卡一区二区| 色婷婷久久99综合精品jk白丝| 国产不卡在线视频| 久久99精品久久久久久动态图| 日韩vs国产vs欧美| 亚洲图片一区二区| 亚洲午夜三级在线| 亚洲欧美电影院| 亚洲视频每日更新| 亚洲欧洲美洲综合色网| 国产精品成人一区二区三区夜夜夜 | 精品久久人人做人人爽| 欧美大尺度电影在线| 欧美一卡二卡三卡四卡| 欧美男男青年gay1069videost| 色av一区二区| 色av成人天堂桃色av| 日本道色综合久久| 91九色最新地址| 在线观看亚洲一区| 欧美日韩在线播放三区| 欧美午夜精品理论片a级按摩| 一本久久a久久免费精品不卡| 91欧美一区二区| 日本丰满少妇一区二区三区| 欧美性猛片xxxx免费看久爱| 欧美日韩在线播放三区四区| 欧美美女视频在线观看| 欧美精品高清视频| 欧美一区二视频| 亚洲精品一区二区精华| 国产日韩欧美精品在线| 国产精品第五页| 亚洲一区在线看| 日本中文字幕一区二区视频| 精品一区二区久久久| 丁香婷婷综合色啪| 91麻豆免费视频| 欧美日韩你懂的| 精品日韩一区二区三区| 国产精品系列在线| 亚洲一区二区视频在线观看| 日本三级韩国三级欧美三级| 国产一区二区三区在线观看免费| 国产成人aaa| 欧美日韩一级黄| 精品精品国产高清a毛片牛牛| 欧美激情综合在线| 亚洲综合在线免费观看| 老司机午夜精品99久久| 成人丝袜高跟foot| 91麻豆精品91久久久久久清纯| 久久影院电视剧免费观看| 《视频一区视频二区| 日韩经典中文字幕一区| 国产91丝袜在线播放0| 色婷婷综合激情| 精品久久久久久久久久久久久久久| 国产精品久久久久久久久免费樱桃| 一区二区高清在线| 免费欧美高清视频| 91麻豆自制传媒国产之光| 日韩欧美国产三级| √…a在线天堂一区| 久久精品国产99久久6| 91丝袜国产在线播放| 精品成人a区在线观看| 尤物av一区二区| 国产成人亚洲精品青草天美| 欧美日韩1234| 亚洲色图欧美在线| 国产九色sp调教91| 宅男在线国产精品| 亚洲欧洲综合另类在线| 激情小说欧美图片| 欧美日韩的一区二区| 亚洲视频在线观看三级| 国产精品一区在线观看乱码| 欧美色欧美亚洲另类二区| 国产色爱av资源综合区| 视频一区二区中文字幕| 91视频免费观看| 国产精品午夜电影| 狠狠色狠狠色综合系列| 欧美日韩激情一区二区三区| 《视频一区视频二区| 国产黄色精品网站| 亚洲精品在线观看视频| 日韩黄色在线观看| 欧美日韩国产另类不卡| 亚洲美女屁股眼交3| 成人精品gif动图一区| 久久综合色婷婷| 免费在线观看精品| 欧美美女网站色| 天堂一区二区在线免费观看| 在线观看av不卡| 一个色妞综合视频在线观看| 99re热这里只有精品免费视频| 久久久99精品免费观看不卡| 美女视频黄a大片欧美| 717成人午夜免费福利电影| 亚洲专区一二三| 欧洲精品视频在线观看| 亚洲中国最大av网站| 91黄色激情网站| 亚洲制服丝袜av| 欧美私人免费视频| 午夜一区二区三区在线观看| 欧美性淫爽ww久久久久无| 亚洲国产成人tv| 欧美日韩国产另类一区| 日韩电影在线观看电影| 日韩亚洲国产中文字幕欧美| 美日韩黄色大片| 久久久久青草大香线综合精品| 国产精品一区久久久久| 久久精品一二三| 成人av网站免费| 一区二区不卡在线视频 午夜欧美不卡在| 91污片在线观看| 亚洲成av人片一区二区梦乃| 91精品国产综合久久精品图片| 全国精品久久少妇| 久久网这里都是精品| 国产成人精品影院| 一区二区欧美视频| 欧美一区二视频| 国产一区啦啦啦在线观看| 国产精品乱码妇女bbbb| 色av一区二区| 麻豆精品一区二区三区| 欧美国产成人精品| 在线日韩国产精品| 老汉av免费一区二区三区| 国产情人综合久久777777| 一本色道a无线码一区v| 免费成人av资源网| 国产精品免费人成网站| 欧美美女一区二区在线观看|