Need help.... How to plot sequences

์กฐํšŒ ์ˆ˜: 2 (์ตœ๊ทผ 30์ผ)
Connor Wright
Connor Wright 2020๋…„ 11์›” 27์ผ
๋Œ“๊ธ€: Star Strider 2020๋…„ 11์›” 27์ผ
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 Center ๋ฐ File Exchange์—์„œ Annotations์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

ํƒœ๊ทธ

์ œํ’ˆ


๋ฆด๋ฆฌ์Šค

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by