How can I plot the spectrum of a signal in MATLAB?
One way is simply to plot the absolute value:

X_total = fft(x_total);
figure;
plot(10*log10(abs(X_total).^2));


Note that if your signal is real, you can plot only the first part of the vector.
Another option is to use the Welch Periodogram

figure;
pwelch(x_total);