Code covered by the BSD License  

Highlights from
Seis_Pick

image thumbnail

Seis_Pick

by

 

06 Feb 2012 (Updated )

Seis_Pick provides an interactive picking environment for processing seismic data.

[spec,f]=plotfft(trace,dt)
function [spec,f]=plotfft(trace,dt)
%
% function [spec,f]=plotfft(trace,dt)
%
% Generates the frequency spectrum of a trace using fft
%
% INPUTS -  trace: vector containing the trace in time domain
%           dt: the sampling rate
%
% OUTPUTS - spec: frequency power spectrum
%           f: frequency vector giving the values for spec
%
%

NL=length(trace);

NFFT=2^nextpow2(NL);
spec=fft(trace)/NL;
f=(1/(2*dt))*(linspace(0,1,NFFT/2+1));
spec=abs(spec(1:NFFT/2+1));

Contact us