Color Pattern Matchiing - What does this mod function mean?

14 ビュー (過去 30 日間)
Estefany Umana
Estefany Umana 2020 年 4 月 23 日
編集済み: darova 2020 年 4 月 24 日
I am using arrays and for loops to create programs that detects specific patterns in an image. I want to know what the mod function does. Why do you add m and n together? Why do you subtract 2 and what does the 8 mean in the code below? What does the mod function below mean specifically?
A(m,n)=mod(m+n-2,8)
  2 件のコメント
darova
darova 2020 年 4 月 24 日
That is too easy for a question. Just see help: LINK
Adam Danz
Adam Danz 2020 年 4 月 24 日
編集済み: darova 2020 年 4 月 24 日
I want to know what the mod function does
mod(x,8) returns the remainder of the fraction (x/8).
Examples:
x = 7/3 = 2 1/3
mod(7,3) = 1
x = 8/3 = 2 2/3
mod(8,3) = 2
Why do you add m and n together? Why do you subtract 2 and what does the 8 mean in the code below?
We couldn't possibly know. There isn't a universal meaning for 'm' and 'n'.

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by