Carrier is 2 * pi * 25, modulating signal is 2 * pi, all the amplitudes are 1s and zero phase.
I realized that I could add a sine wave right at the end. I get a carrier in frequency domain, but my signal in time domain looks strange.
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityCarrier is 2 * pi * 25, modulating signal is 2 * pi, all the amplitudes are 1s and zero phase.
I realized that I could add a sine wave right at the end. I get a carrier in frequency domain, but my signal in time domain looks strange.
I see how you added the carrier by multipying by $1 + 0.5cos(2\pi f t)$ (or you used sine, wouldn't change it), and that approach seems fine to me.
It looks like you do actually see the carrier in your plot! What I see from your plot does appear to be a signal at +/-25 Hz which is what we would expect to see for $cos(2\pi 25 t)$ (or sine if you used that)
However also note that your plot claims the resolution bandwidth is 4.88 Hz. Your modulating signal of 1 Hz would not be visible unless you decrease that resolution bandwidth! Right now all signals (25 Hz carrier and +/-1 Hz modulation sidebands) are within that bandwidth so would appear as one signal which is what you see.
To increase the resolution bandwidth, you need to increase the total simulation time (which would increase the number of points in the FFT if you keep the same sampling rate, or you could decrease the sampling rate with the same number of samples or do both). Resolution bandwidth is approximately the inverse of the simulation time, but that bandwidth would be increased further than $1/T$ if you are using windowing in the FFT. From the plot it does not look like windowing is used, in which case your simulation duration would be predicted to be $1/4.88$ Hz or $204.9$ ms. With your sampling rate of $5$ KHz this would suggest $1024$ samples. (It may be a sliding FFT block size over 1024 samples as I also see T = 10s). Thankfully your plot tells you what the bandwidth is so just increase the total FFT size, decrease your sampling rate or both --to see your $1$ Hz sidebands clearly you should make the resolution bandwitdth on the order of $0.1$ Hz.