Hello all, i am trying to write a script file that will only print if [tex]R[/tex] is divisible by [tex]D[/tex] where [tex]D=3[/tex](adsbygoogle = window.adsbygoogle || []).push({});

I wrote a loop statement with the condition being [tex]fix(R/D)=R/D[/tex] this works fine but there is another way that the book does it. The book uses [tex]mod(R,D)=0[/tex] as the condition. I tried typing in [tex]help mod[/tex] but the explanation that MATLAB gave was extreamly confusing, can anyone tell me what the command [tex]mod(x,y)[/tex] says....what does the [tex](x,y)[/tex] mean...thanks in adnvance.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB confusion

**Physics Forums | Science Articles, Homework Help, Discussion**