Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Modulo problem

  1. Sep 22, 2012 #1
    I need to create a MATLAB function file that will accept a modulo values (from 3 to 9; that is Z3 to Z9) and will output the least possible value describe by the modulo conditions

    I don't know how to start it because I am not allowed to use the mod() and rem().

    Please give me an idea how to do this, I badly need help with this one


    I use array but my prof said it is prohibited because once I use matrix it is easy definable
     
    Last edited by a moderator: Sep 23, 2012
  2. jcsd
  3. Sep 22, 2012 #2
    don't quite understand what you are trying to do...it would help if you at least showed the "illegal" way that the prof does not want...but at least we would know what you are trying to achieve....or maybe I am just too ignorant and do not know what Z3 or Z9 is.

    Say, can you just use a counter, a do loop and substraction? Multiplication can be achieve by summation and Division by substraction...does this help?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Modulo problem
  1. Problem with ndsolve (Replies: 2)

  2. MATLAB problem (Replies: 1)

Loading...