Info

此问题已关闭。 请重新打开它进行编辑或回答。

Multiple embedded IF Statements

1 次查看(过去 30 天)
Aldo Amaya
Aldo Amaya 2014-2-20
关闭: MATLAB Answer Bot 2021-8-20
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 个评论
Walter Roberson
Walter Roberson 2014-2-20
Are you sure that e=e+1; should only be done in the case f==2 & e==2 ?

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by