⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 attributes.m

📁 这是matlab在地球物理数据处理方面的源码
💻 M
字号:
function [envelope,instphi,instfreq] = attributes(traces,t)% function attributes - calculates the amplitude envelope, the instantaneous phase,% and the instantaneous frequency for a set of seismic traces% The program uses the Matlab Hilbert transform function.% The envelope is simply the absolute value of the output of the Hilbert transform.% That is, the real part is the input function and the imaginary part is its Hilbert% transform. The Hilbert transform produces the 90 degree phase shifted version of% the input trace.% The instantaneous phase is simply the angle(unwrap(hilbert(traces))) and the% instantaneous phase is the derivative of this function with respect to time.% The instantaneous frequency is not really a frequency but has the same units of% frequency.delt  = t(2) - t(1);[m,n] = size(traces);temp = hilbert(traces);  % Note that traces must be in column formatinstphi = unwrap(angle(temp));envelope = abs(temp);temp = diff(instphi)/delt;  fil = [0.2 0.2 0.2 0.2 0.2]; % For smoothingfor i = 1:n   instfreq(:,i) = conv(fil,temp(:,i)); % Smoothed derivativeendfiguresubplot(1,2,1)imagesc(1:n,t,traces);title('original traces')ylabel('time (seconds)')subplot(1,2,2)imagesc(1:n,t,envelope)title('Amplitude Envelope')colorbarfiguresubplot(1,2,1)imagesc(1:n,t,instphi)title('Instantanteous Phase')subplot(1,2,2)imagesc(1:n,t,instfreq)colorbarreturn;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -