As per my understanding you want to plot the converted LSF to frequency and plot it against frequency, to convert your Line Spread Function (LSF) signal from the spatial domain to the frequency domain, you can use the Fast Fourier Transform (FFT) using the 'fft' function in MATLAB, Here is an example code how you can perform this:
% Sample data
position = [-1.780405, -1.186936, -0.593468, 0, 0.593468, 1.186936, 1.780405, 2.373873];
LSF = [48.172258, 48.866131, 46.863226, 49.217079, 46.385073, 40.899024, 39.912261, 37.784698];
% Full data would be used in actual implementation
% position = ... (your full 251-element position array)
% LSF = ... (your full 251-element LSF array)
% Perform FFT
LSF_fft = fft(LSF);
% Compute frequency axis
N = length(LSF); % Number of samples
d = mean(diff(position)); % Average spacing in micrometers
Fs = 1/d; % Sampling frequency (in inverse micrometers)
freq = linspace(0, Fs/2, floor(N/2)+1); % Frequency axis (only positive frequencies)
% Plot magnitude of FFT
figure;
plot(freq, abs(LSF_fft(1:floor(N/2)+1)));
xlabel('Frequency (\omega) [1/\mum]');
ylabel('Magnitude');
title('Frequency Domain Representation of LSF');
You can know more about the 'fft' function using the link below: