Hi Ana,
I understand that you have already plotted the LTSPICE plot and want to add a new plot to compare.
You can do this by followign below steps:
1.Plot Your LTSPICE Data (Assuming it's done)
2.Define Your Transfer Function
% Define a transfer function, for example, H(s) = (10s + 1) / (s^2 + 10s + 100)
numerator = [10 1]; % Coefficients of the numerator
denominator = [1 10 100]; % Coefficients of the denominator
H = tf(numerator, denominator); % Creates the transfer function
3. Generate the Bode Plot
opts = bodeoptions; % Gets default options for Bode plot
opts.FreqUnits = 'Hz'; % Sets frequency units to Hz (default is rad/s)
% Generate the Bode plot for magnitude only and get the data
[mag,phase,wout] = bode(H, {min(frequency)*2*pi, max(frequency)*2*pi});
magdB = 20*log10(squeeze(mag)); % Convert magnitude to dB
woutHz = wout / (2*pi); % Convert frequency from rad/s to Hz
% Add the Bode magnitude plot to the existing plot
semilogx(woutHz, magdB, 'r--'); % Plotting in red dashed line for distinction
legend('LTSPICE Data', 'Transfer Function Response');
I hope it helps!