AM modulated signal not centered at carrier frequency [closed]

I am trying to modulate the signal bl_msg_time (this is a speech signal) using DSB-SC modulation however the signal doesn't appear centered at the carrier frequency. Below is the matlab code and the result of the plot.

f_car = 1000000;
msg_dsb_time = bl_msg_time .* cos(2*pi*f_car*t);
msg_dsb_freq = fftshift(fft(msg_dsb_time));
msg_dsb_freq=msg_dsb_freq/length(msg_dsb_freq);
plot(fx,abs(msg_dsb_freq));


Here is a code snipped that works, you can get it and modify according to your needs.

Fsim = 5E6;         % simulation sampling frequency
Tsim = 1/Fsim;      % simulation sampling period
Tdur = 0.1;         % duration of simulation in seconds...
t = [0:Tsim:Tdur];  % t = n*Tsim; sampled time instants...
L = length(t);      % number of samples in the signal

f_car = 1E6;        % DSB-SC modulation carrier frequency

bl_msg_time = filter(fir1(264,0.03),1,randn(1,L));   % generate a bandlimited message signal

msg_dsb_time = bl_msg_time .* cos(2*pi*f_car*t);
msg_dsb_freq = fftshift(fft(msg_dsb_time));
msg_dsb_freq=msg_dsb_freq/length(msg_dsb_freq);

fx = linspace(-Fsim/2,Fsim/2,L);
plot(fx,abs(msg_dsb_freq));
title(['DSB-SC modulated signal, Fcar = ' , num2str(f_car)])
xlabel('frequency in Hz')


The produced output is:

As you can see the modulated signal is centered at the correct frequency.