Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Multiple embedded IF Statements

1 Ansicht (letzte 30 Tage)
Aldo Amaya
Aldo Amaya am 20 Feb. 2014
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hi All, I am currently piloting a new tracking system for rodent behavior. These are the same video files for a single cohort 87 trials and each is being separated by center point tracking versus
When I initially separated the first 87 trials by center and nose tracking I had no issues. However. When I try to give it multiple if statements it only gives me 2 of the outputs.
Cdata2=[ICCD ICCF ICCL ILCD ILCF ILCL IRCD IRCF IRCL IZLSD IZLSF IZLSL IZRSD IZRSF IZRSL];
Ndata2=[ICCD2 ICCF2 ICCL2 ILCD2 ILCF2 ILCL2 IRCD2 IRCF2 IRCL2 IZLSD2 IZLSF2 IZLSL2 IZRSD2 IZRSF2 IZRSL2];
BKGX=[{1:87};{88:174}];
f=1;
while f<=length(BKGX)
Cdata=Cdata2(BKGX{f},:)
Ndata=Ndata2(BKGX{f},:)
...
d=[{Cdata} ;{Ndata}];
e=1;
while e<=length(d);
SUMBDt=[d{e}];
...
if f==1 && e==1
SOC_Data_CenSBKG=ALLGEN';
elseif f==1 && e==2
SOC_Data_NosSBKG=ALLGEN';
elseif f==2 && e==1
SOC_Data_CenDBKG=ALLGEN';
elseif f==2 && e==2
SOC_Data_NosDBKG=ALLGEN';
e=e+1;
end
f=f+1
end
end
  1 Kommentar
Walter Roberson
Walter Roberson am 20 Feb. 2014
Are you sure that e=e+1; should only be done in the case f==2 & e==2 ?

Antworten (0)

Diese Frage ist geschlossen.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by