Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Using a vector in an If statement for comet plot

2 ビュー (過去 30 日間)
ctin
ctin 2018 年 3 月 19 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have a matrix that represents a total score for each round. I want to form a loop that goes through the matrix with a nested If statement for if the first element is odd, then playerBscore gets +1 and if first element is even, then playerAscore gets +1 and so on throughout the matrix so I can plot the function for each round on comet. I'm not sure what to set the initial playerBscore and playerAscore as either.

回答 (1 件)

KSSV
KSSV 2018 年 3 月 19 日
編集済み: KSSV 2018 年 3 月 19 日
Read about mod,,this will help you to know whether the given number is even or odd.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by