Creating a MATLAB Function File Without Mod/Rem

  • Context: MATLAB 
  • Thread starter Thread starter cpgarcia164
  • Start date Start date
  • Tags Tags
    File Function Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
cpgarcia164
Messages
2
Reaction score
0
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 oneI use array but my prof said it is prohibited because once I use matrix it is easy definable
 
Last edited by a moderator:
Physics news on Phys.org
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?