Need help.... How to plot sequences

5 次查看(过去 30 天)
Hello,
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, … }
Cheers
  2 个评论
Mario van Rooij
Mario van Rooij 2020-11-27
Where does the n come into play? What do you want to plot when n = 10 for example?
Connor Wright
Connor Wright 2020-11-27
I want to plot −20 ≤ 𝑛 ≤ 12.

请先登录,再进行评论。

采纳的回答

Star Strider
Star Strider 2020-11-27
The mod function and the colon,: operator are your friends!
  6 个评论
Connor Wright
Connor Wright 2020-11-27
I really am sorry about this but I dont understand what you mean.
Star Strider
Star Strider 2020-11-27
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by