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 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
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
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!