フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

I have the code which generates an array for a1. For N = 10, what does a1 = [a1 a1+N/2] stores.? Is there any need?

2 ビュー (過去 30 日間)
Neha W
Neha W 2016 年 9 月 21 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
if mod(N,2)==0 && mod(N,4)~= 0
a1 = 1: (N/2-1);
a1 = a1(gcd(a1,N/2)==1);
a1 = [a1 a1+N/2];
end

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 9 月 21 日
a1 = [a1 a1+N/2]
is the same as
a1 = horzcat(a1, a1+N/2);
which is to say, append a1+N/2 on the end of the current a1

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by