Need help.... How to plot sequences

4 views (last 30 days)
I have a report due in two days and have no idea how to plot this sequence. I know almost nothing about Matlab and my tutors as usual have been no help at all.
If some one can help me out here I would greatly appriciate it.
The sequence is:
𝑥(𝑛) = {… , 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, … }
Connor Wright
Connor Wright on 27 Nov 2020
I want to plot −20 ≤ 𝑛 ≤ 12.

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 27 Nov 2020
The mod function and the colon,: operator are your friends!
Star Strider
Star Strider on 27 Nov 2020
Please experiment!
Use my example as a guide, and carefully read the documentation for colon. Note how to use it to code a descending sequence.

Sign in to comment.

More Answers (0)


Find more on Graphics Performance in Help Center and File Exchange





Community Treasure Hunt

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

Start Hunting!

Translated by