版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
F-K变换程序手册编译环境:MatlabR2013a64-bit(8.1.0.604)编译时间:2017.6.20源程序列表序号文件名称说明1fktran.mF-K变换2fftrl.m傅里叶变换3demo.m主函数4R.mat调用文件5t.mat调用文件6x.mat调用文件1、fktran.mF-K变换程序说明:F-K变换函数原型:function[spec,f,kx]=fktran(seis,t,x,ntpad,nxpad,percent,ishift)参数列表:序号参数名说明1seis输入二维地震记录2nsamp,ntr输入信号维度3nxpad将位置序列补充为2的整数次幂4ntpad将时间序列补充为2的整数次幂5spec频率波数谱6kx波数序列7f频率序列8t输入时间序列9x输入位置序列附程序代码:function[spec,f,kx]=fktran(seis,t,x,ntpad,nxpad,percent,ishift)%FKTRAN:Forwardfktransform%[spec,f,kx]=fktran(seis,t,x,ntpad,nxpad,percent,ishift)%%FKTRANusesMatlab'sbuiltinffttoperforma2-df-ktransform%onarealvalued(presumablyseismictime-space)matrix.Onlythe%positivef'sarecalculatedwhileallkxsare.Matlab's'fft'isused%oneachcolumnforthet-ftransformwhile'ifft'isusedoneachrow%forthex-kxtransform.Theinversetransformisperformedbyifktran.%%seis...input2-dseismicmatrix.Onetracepercolumn.%t...vectoroftimecoordinatesforseis.length(t)mustbethe%sameasnumberofrowsinseis.%x...vectorofspacecoordinatesforseis.length(x)mustbethesame%asthenumberofcolumnsinseis.%ntpad...padseiswithzerofilledrowsuntilitisthissize.%*******default=nextpowerof2******%nxpad...padseiswithzerofilledcolumnsuntilitisthissize.%*******default=nextpowerof2******%percent...applyaraisedcosinetapertobothtandxpriortozeropad.%lengthoftaperistheispercentageofthelengthofthexandtaxes%*******default=0*********%ishift...if1,thenthekaxisofthetransformisunwrappedtoput%kx=0inthemiddle.%*******default=1*******%spec...complexvaluedf-ktransformofseis%f...vectoroffrequencycoordinatesfortherowsofspec%kx...vectorofwavenumbercoordinatesforthecolumnsofspec%[nsamp,ntr]=size(seis);if(length(t)~=nsamp)error('Timecoordinatevectorisincorrect');endif(length(x)~=ntr)error('Spacecoordinatevectorisincorrect');endif(nargin<7)ishift=1;endif(nargin<6)percent=0.;endif(nargin<5)nxpad=2^nextpow2(x);endif(nargin<4)ntpad=2^nextpow2(t);end%usefftrlforthet-ftransform[specfx,f]=fftrl(seis,t,percent,ntpad);clearseis;%oktaperandpadinxif(percent>0)mw=mwindow(ntr,percent);mw=mw(ones(1,ntr),:);specfx=specfx.*mw;clearmw;endif(ntr<nxpad)ntr=nxpad;%thiscausesiffttoapplythexpadend%fftonrowsspec=ifft(specfx.',ntr).';%computekxkxnyq=1./(2.*(x(2)-x(1)));dkx=2.*kxnyq/ntr;kx=[0:dkx:kxnyq-dkx-kxnyq:dkx:-dkx];if(ishift==1)[kx,ikx]=sort(kx);spec=spec(:,ikx);end2、fftrl.m傅里叶变换程序说明:傅里叶变换函数原型:function[spec,f]=fftrl(s,t,percent,n)参数列表:序号参数名说明1s输入信号2t时间序列3spec频谱4f频率附程序代码:function[spec,f]=fftrl(s,t,percent,n)%FFTRL:forwardFouriertransformforreal-valuedsignals.%%[spec,f]=fftrl(s,t,percent,n)%[spec,f]=fftrl(s,t,percent)%[spec,f]=fftrl(s,t)%%Forwardfouriertransformofareal-valuedsignal.Relativeto%MATLAB'sfftitreturnsonlythepositivefrequenciesinanarray%roughlyhalfthesize.Ifthereareninputtimesamples,thenthere%willbefloor(n/2+1)frequencysamples.Thismeansthatifnisaneven%number,thenatimeseriesoflengthnandoneoflengthn+1willproduce%frequencyspectraofthesamelength.However,onlythefirstcasewill%haveasampleatNyquist.%Iftheinputtraceisavector,thenthereturn%issimplythetransformofthatvector.Ifamatrix,theneach%columnofthematrixistransformed.Theinverseisaccomplishedby%IFFTRL.%%s=inputsignal(traceorgather,i.e.vectorormatrix)%t=inputtimecoordinatevector%percent=specifiesthelengthofaraisedcosinetapertobe%appliedtos(bothends)priortoanypadding.%Taperisapercentofthelengthofs.Taperis%appliedusingMWINDOW.%**********Default=0%***********%n=lengthtowhichtheinputtraceistobepaddedwithzeros.%**********Defaultistheinputlength(nopad)***********%%spec=outputspectrum%f=outputfrequencysamplevectorif(nargin<4)n=length(t);endif(nargin<3)percent=0.0;end%determinenumberoftracesinensemble[l,m]=size(s);ntraces=1;itr=0;%transposeflagif(l==1)nsamps=m;itr=1;s=s(:);%switchtocolumnvectorselseif(m==1)nsamps=l;elsensamps=l;ntraces=m;endif(nsamps~=length(t))t=t(1)+(t(2)-t(1))*(0:nsamps-1);if(nargin<4)n=length(t);end%error('timevectorandtracematrixdon''tmatchinlength');end%applythetaperif(percent>0)mw=mwindow(nsamps,percent);mw=mw(:,ones(1,ntraces));s=s.*mw;clearmwend%padsifneededif(nsamps<n),s=[s;zeros(n-nsamps,ntraces)];nsamps=n;end%transformthearrayspec=fft(s,nsamps);spec=spec(1:floor(n/2+1),:);%saveonlythepositivefrequenciesclears;%buildthefrequencyvectorfnyq=1./(2*(t(2)-t(1)));nf=size(spec,1);df=2*fnyq/n;%f=linspace(0.,fnyq,nf)';f=df*(0:nf-1)';if(itr)f=f';spec=spec.';end3、demo.m主函数程序说明:主函数
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- CN116092333B 航班保障节点的确定方法、装置、电子设备及存储介质 (中国民用航空总局第二研究所)
- 培养学生的道德观和法治意识-道德法治教育专家
- 商业航天行业研究系列6:平流层之上的掘金战超低轨卫星产业深度
- 道德与法治 人民代表大会的职权 课件-2025-2026学年统编版道德与法治八年级下册
- 2026全球与中国砷化铟镓PIN光电二极管行业发展动态及需求规模预测报告
- 2025-2030中国板(COB)发光二极管行业市场发展趋势与前景展望战略研究报告
- 2025-2030中国无卤阻燃环保电线电缆材料行业现状调查与投资策略咨询研究研究报告
- 2025至2030生命科学仪器行业市场现状研发动态及投资潜力评估分析研究报告
- 2026中国椰子肉市场营销态势及销售效益预测报告
- 2026-2030液晶彩电行业市场深度分析及发展策略研究报告
- GB/T 26941-2025隔离栅
- T-CBJ 2310-2024 酱香型白酒核心产区(仁怀) 酱香型白酒(大曲)生产技术规范
- 长春公益岗管理办法
- 国网竞聘面试题库及答案
- 矿山救护队培训知识课件
- 托育园急救知识培训课件
- 桌游设计基础知识培训课件
- 智慧生态环境概述
- GA/T 2175-2024公安交通集成指挥平台接入规范
- 保障性住房政策课件
- 《守株待兔》公开课课件
评论
0/150
提交评论