필터 지우기
필터 지우기

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

답변 (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