我一直在尝试通过给定的采样频率生成正弦和余弦采样图。
fc = 4092; % Carrier frequency Hz
fs = 16368; % Sampling freq Hz
ts = 1/fs; % Sampled time
nn = [0 :4091] % Array with numbers from 0 to fc
y1 = exp(i*2*pi*fc*ts*nn); % Exponential equation
cosine = real(y1);
sine = imag(y1);
subplot(2,2,1);
plot(cosine);
axis tight;
grid on;
subplot(2,2,2);
plot(sine);
axis tight;
grid on;