%FRACITER is a subroutine of the program "fractory.m". It generates %the data for fractal images using a randomized algorithm. It is %called by the subroutine "fracdrw.m". %Initialize variables and generate IFS sequence D2. [KK,M]=size(A); KK=KK/2; S=zeros(KK+1,1); for nn=1:KK S(nn+1)=abs(det(A((2*nn-1):(2*nn),:))); end S=max(S,sum(S)/100); S(1)=0; S=S/sum(S); for nn=2:KK+1 S(nn)=S(nn)+S(nn-1); end D1=rand(1,Iter); D2=zeros(1,Iter); for nn=1:KK D2=D2+nn*(D1>=S(nn) & D1