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