‘What is the meaning of the y axis?’
It is necessary to normalise the fft result by the length of the vector it uses as an argument. (This is nin the fft documentation.) Once that is done, the y-axis units make sense.
‘Is this correct?’
Almost. I made a few changes to eliminate the constant offset from the fft result, normalise it, and plot a one-sided Fourier transform. The multiplication-by-2 corrects the one-sided Fourier transform amplitude, since the energy at each frequency is divided evenly betweek the ‘positive’ and ‘negativeÄ fft frequencies.
X = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/606440/botdata.csv');
t = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/606445/botdatatime.csv');
subplot(2,1,1);
plot(t,X);
grid
xlabel('Time')
ylabel('Amplitude')
L = numel(X);
Ts = mean(diff(t))
% Tsd = std(mean(diff(t)))
Fs = 1/Ts;
Fn = Fs/2
xft=fft(X-mean(X),[],1)/L;
Fv = linspace(0, 1, fix(L/2)+1)*Fn;
Iv = 1:numel(Fv);
xabs = abs(xft);
subplot(2,1,2);
plot(Fv,mag2db(xabs(Iv)*2))
grid
ylim([-75 50])
xlabel('Freqency [units]')
ylabel('Power [dB]')
.