prepare structure for R package
[valse.git] / OLD_MATLAB / SelectModel / suppressionmodelesegaux.m
diff --git a/OLD_MATLAB/SelectModel/suppressionmodelesegaux.m b/OLD_MATLAB/SelectModel/suppressionmodelesegaux.m
new file mode 100644 (file)
index 0000000..3d2a3a9
--- /dev/null
@@ -0,0 +1,18 @@
+function[B1,B2,glambda,ind,rho,pi]=suppressionmodelesegaux(B1,B2,glambda,rho,pi)
+
+       ind=[];
+       for l=1:length(glambda) 
+               for ll=1:l-1
+                       if B1(:,:,l)==B1(:,:,ll)
+                               ind=[ind l];
+                       end
+               end
+       end
+       ind=unique(ind);
+       B1(:,:,ind)=[];
+       glambda(ind)=[];
+       B2(:,:,ind)=[];
+       rho(:,:,:,ind)=[];
+       pi(:,ind)=[];
+
+end