www.pudn.com > SHIPCONTROL.rar > marinercontrolmodel.m, change:2016-02-20,size:472b


clear all;clc; 
 
ui=0; 
n=1000; 
m=7; 
xu=zeros(n+1,m); 
xu(1,:)=[1 0 0 0 0 0 0]; 
for i=1:n 
     gt=mariner(xu(i,:),ui) 
   for j=1:m 
       if i>1 
    xu(i+1,j)=xu(i,j)+gt(j); 
       end 
   end 
      
end 
%xu(:,6) 
 plot(xu(:,7)) 
figure 
 plot(xu(:,5),xu(:,6))  
%      
     
     
%     x(i,2)=x(i-1,2)+gt(2); 
%     x(i,3)=x(i-1,3)+gt(3); 
%     x(i,4)=x(i-1,4)+gt(4); 
%     x(i,5)=x(i-1,5)+gt(5); 
%     x(i,6)=x(i-1,6)+gt(6); 
%     x(i,7)=x(i-1,7)+gt(7);