Which function provide this output?

12 Ansichten (letzte 30 Tage)
Eduardo de la Rosa
Eduardo de la Rosa am 5 Mär. 2021
Kommentiert: Walter Roberson am 6 Mär. 2021
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 Kommentare
Basil C.
Basil C. am 6 Mär. 2021
I think you mean difference of remainder and target value @Walter Roberson
Walter Roberson
Walter Roberson am 6 Mär. 2021
No, I mean sum. 1 remainder, desired value is 7, sum is 8

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by