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!