how to generate ZCZ sequences
    조회 수: 11 (최근 30일)
  
       이전 댓글 표시
    
hello can you help me on how to generate zcz (zero correlation zone ) i tried this code but it does not work 
% Golay complementary pair
Z0 = [-1 -1 1 -1 -1 -1 -1 1];
Z1 = [-1 1 1 1 -1 1 -1 -1];
% Starter matrix Z(0,0)
Z = [Z0; Z1];
% ZCZ parameters
N = 8;  % Code length
K = 2;  % Number of codes
Z0_length = 2;  % Zero-zone length
% Generate ZCZ sequences
for n = 1:N
    Z = [Z, Z.*repmat(Z(:,1), 1, size(Z, 2))];
end
% Increase the number of codes
Z = [Z, Z, Z, -Z];
% Display the ZCZ sequences
disp(Z);
댓글 수: 0
답변 (1개)
  Avni Agrawal
      
 2025년 2월 26일
        I understand that you are trying to generate Zero Correlation Zone (ZCZ) sequences using Golay complementary pairs in MATLAB.
Here is the correct approach to generate ZCZ sequences properly:
% Golay complementary pair
Z0 = [-1 -1 1 -1 -1 -1 -1 1];
Z1 = [-1 1 1 1 -1 1 -1 -1];
% Starter matrix Z(0,0)
Z = [Z0; Z1];
% ZCZ parameters
N = 8;  % Code length
K = 2;  % Number of codes
ZCZ_length = 2;  % Zero correlation zone length
% Initialize the ZCZ matrix
ZCZ_sequences = zeros(K, N);
% Generate ZCZ sequences
for i = 1:K
    % Circularly shift the sequences
    ZCZ_sequences(i, :) = circshift(Z(i, :), [0, (i-1)*ZCZ_length]);
end
% Ensure the zero correlation zone condition
% This part is a conceptual placeholder, as generating ZCZ sequences
% requires specific design methods based on the application context
% and mathematical properties.
% Display the ZCZ sequences
disp('ZCZ Sequences:');
disp(ZCZ_sequences);
I hope this helps!
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!