How can i create a sequence?

2 ビュー (過去 30 日間)
Gn Gnk
Gn Gnk 2019 年 11 月 2 日
編集済み: John D'Errico 2019 年 11 月 3 日
Hello,
I have a sequence Xn:
xn ∈ {(±1, ±i)} means xn is an element of the set [-1-i, -1+i, 1-i, 1+i] and i want to create this sequence for n=1 to N=100.How can i make this happen?
thank you.
  4 件のコメント
Gn Gnk
Gn Gnk 2019 年 11 月 3 日
Sorry but i thought i got the answer but OBVIOUSLY i didnt thats why i am asking again with the extra information the guy that previously answered my question gave it to me .I dont have any intention to repeat myself and please if you are not having anything to help me dont comment on my question.
Thank you.
John D'Errico
John D'Errico 2019 年 11 月 3 日
編集済み: John D'Errico 2019 年 11 月 3 日
Then explain (comment) that the answer was not helpful.
Seome people want to just ask the same question every couple of days or even every hour, hoping to get an answer they want.
Note that your original question was quite confusing, and even after you made a comment, it was still confusing. That explains why the answer was inaccurate.
For example, even here you describe exactly 4 terms of that sequence. Should it then repeat in exactly the same sequence, so you would then have 25 repetitions of those 4 complex numbers?

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2019 年 11 月 3 日
To create that "sequence for n=1 to N=100", simply do this:
for n = 1 : 100
result = [-1-1i, -1+1i, 1-1i, 1+1i] % Create this sequence of 4 values.
end
Not sure why you want that though. Take note that the i have a 1 with no space or operator in between them so that 1i = sqrt(-1), the imaginary variable.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by