Which function provide this output?

조회 수: 1 (최근 30일)
Eduardo de la Rosa
Eduardo de la Rosa 2021년 3월 5일
댓글: Walter Roberson 2021년 3월 6일
Hello everyone!
I need a function f(x), where x are positive integers, that provides the following output pattern:
x: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18...
f(x): 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6...
Thanks in advance!
  댓글 수: 3
Basil C.
Basil C. 2021년 3월 6일
I think you mean difference of remainder and target value @Walter Roberson
Walter Roberson
Walter Roberson 2021년 3월 6일
No, I mean sum. 1 remainder, desired value is 7, sum is 8

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by