From 4b7dcfcf065598af90c2e51da0f25868d4e9571c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr>
Date: Wed, 13 Jun 2012 11:09:57 +0200
Subject: [PATCH] Remove MATLAB short-circuit operators

They trigger warnings under Octave
(cherry picked from commit 661531ebffba59737604dee49272fa9a493e815f)
---
 matlab/gsa/stab_map_.m | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/matlab/gsa/stab_map_.m b/matlab/gsa/stab_map_.m
index dc0f369ee5..049c659bbd 100644
--- a/matlab/gsa/stab_map_.m
+++ b/matlab/gsa/stab_map_.m
@@ -126,9 +126,9 @@ if fload==0,
 %         lpmat = prep_ide(Nsam,np,5);
 %         Nsam=size(lpmat,1);
     else
-        if np<52 & ilptau>0,
+        if np<52 && ilptau>0,
             [lpmat] = qmc_sequence(np, int64(0), 0, Nsam)';
-            if np>30 | ilptau==2, % scrambled lptau
+            if np>30 || ilptau==2, % scrambled lptau
                 for j=1:np,
                     lpmat(:,j)=lpmat(randperm(Nsam),j);
                 end
@@ -302,7 +302,7 @@ if fload==0,
                     if any(isnan(egg(1:nspred,j)))
                         iwrong(j)=j;
                     else
-                        if (nboth | nfwrd) & abs(egg(nspred+1,j))<=options_.qz_criterium,
+                        if (nboth || nfwrd) && abs(egg(nspred+1,j))<=options_.qz_criterium,
                             iindeterm(j)=j;
                         end
                     end
@@ -402,7 +402,7 @@ else
     end
 
 
-    if prepSA & isempty(strmatch('T',who('-file', filetoload),'exact')),
+    if prepSA && isempty(strmatch('T',who('-file', filetoload),'exact')),
         h = dyn_waitbar(0,'Please wait...');
         options_.periods=0;
         options_.nomoments=1;
@@ -463,7 +463,7 @@ delete([OutputDirectoryName,'/',fname_,'_',auname,'_corr_*.*']);
 delete([OutputDirectoryName,'/',fname_,'_',aunstname,'_corr_*.*']);
 delete([OutputDirectoryName,'/',fname_,'_',aindname,'_corr_*.*']);
 
-if length(iunstable)>0 & length(iunstable)<Nsam,
+if length(iunstable)>0 && length(iunstable)<Nsam,
     fprintf(['%4.1f%% of the prior support is stable.\n'],length(istable)/Nsam*100)
     fprintf(['%4.1f%% of the prior support is unstable.\n'],(length(iunstable)-length(iwrong)-length(iindeterm) )/Nsam*100)
     if ~isempty(iindeterm),
-- 
GitLab