close all; freq_sam = 100000; % samples in tt1 data period_tt1 = 0.005; % time period freq_tt1 = 1/period_tt1; % frequency data = importdata('D:\Data_tokamak\data\obp.txt'); x_data = data(:,1); y_data = data(:,2); disp(x_data); disp(y_data); signal_tt1 = data; fft_tt1 = fft(signal_tt1); % fourier transform fft_tt1 = fftshift(fft_tt1); % performing fft shift f = freq_sam/2*linspace(-1,1,freq_sam); figure; plot(f, fft_tt1);
I prefer the pspectrum function for these analyses. See specifically Spectrogram and Reassigned Spectrogram of Chirp for an example of returning the data and plotting it as well.
data = readmatrix('D:\Data_tokamak\data\obp.txt'); x_data = data(:,1); y_data = data(:,2); Ts = mean(diff(x_data)) Fs = 1/Ts; figure pspectrum(y_data, Fs, 'spectrogram') % Plot 'pspectrum' 'spectrogram' [sp,fp,tp] = pspectrum(y_data,fs,"spectrogram"); % Return Values, Then Plot figure waterfall(fp,tp,sp') set(gca,XDir="reverse",View=[60 60]) ylabel("Time (s)") xlabel("Frequency (Hz)")
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.