temp = load('temp.dat'); Temp = temp(:, 1); Time = temp(:, 2); n = size(temp, 1); I = abs(fft(Temp-mean(Temp))/sqrt(n)); P = I*4/n; f = (0:176)./352; plot(f, P(1:177), '-k', 'LineWidth', 2) set(gca, 'Box', 'off', 'FontSize', 22, ... 'XLim', [0, 0.5], 'YLim', [0, 0.048], ... 'XTick', 0:0.1:0.5, 'YTick', 0:0.01:0.04, 'TickDir', 'out') xlabel('Frequency', 'FontSize', 22) set(gcf, 'Position', [200, 100, 1000, 800])