Info

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

Using a vector in an If statement for comet plot

2 Ansichten (letzte 30 Tage)
ctin
ctin am 19 Mär. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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.

Antworten (1)

KSSV
KSSV am 19 Mär. 2018
Bearbeitet: KSSV am 19 Mär. 2018
Read about mod,,this will help you to know whether the given number is even or odd.

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