Untitled
unknown
plain_text
3 years ago
379 B
7
Indexable
n=30; n1=0; z(1)=1; x =[4 3 1 6 1 5 4 4 6 5 3 2 1 2 2 4 1 2 3 5 6 5 1 4 2 5 2 4 6 5]; fi=[1 2 3 4; 2 2 3 4; 1 0 4 4; 2 3 3 4; 0 1 1 1; 4 4 4 0]; f= [1 0 0 0]; for j =1:n for i=1:4 for k=1:6 if z(j)==i && x(j)==k z(j+1)=fi(k,i); y(j)=f(i); if z(j)==3 n1=n1+1; end; end; end; end; end; d=n1/n subplot (2,1,1), plot (0:1:n,z); subplot (2,1,2), plot (0:1:n-1,y);
Editor is loading...