フィルターのクリア

What is wrong with my script?

3 ビュー (過去 30 日間)
jakobjakob
jakobjakob 2018 年 6 月 8 日
コメント済み: jakobjakob 2018 年 6 月 8 日
THIS IS THE RELEVANT PART OF THE SCRIPT:
index_aanname = find(strcmp(alldata(:,5), 'Aanname') == 1);
TA = tijdnum(index_aanname);
TA10 = TA - 10;
SA = speler(index_aanname);
for j= 1:240
k=index_aanname(j);
if (strcmp(alldata(k,3), 'SA{j}') == 1) && (strcmp(alldata(k),4),'Voor') == 1) && (TA10(j) < tijdnum(index_aanname(j))) && (tijdnum(index_aanname(j)) < TA(j));
asdf = tijdnum(index_aanname(j));
B{j} = [asdf];
end
end
Can someone help me? Something is wrong with the IF statement, because asdf doesn't arise. There is no error, so not all assumptions are approved, but I am sure asdf has to appear. Who could help me?

採用された回答

James Tursa
James Tursa 2018 年 6 月 8 日
編集済み: James Tursa 2018 年 6 月 8 日
Should this
strcmp(alldata(k,3), 'SA{j}')
be this
strcmp(alldata(k,3), SA{j})
And should this
strcmp(alldata(k),4),'Voor'
be this
strcmp(alldata(k,4),'Voor')
  1 件のコメント
jakobjakob
jakobjakob 2018 年 6 月 8 日
Thank you very much, that was the problem

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by