function check = myapodize(data,shape,aplw)
%==========================================================================
%
% filename : apodize.m
%
% directory :
%
% author(s) : lonvim
%
% started writing : 2010
%
% last update : 09-01-2010
%
% parameters in : begtime - begin time of the data , default: 0
% data - name of current data file imported from text ,format: r+i*j.
% shape - 'l' for Lorentzian apodization.
% 'g' for Gaussian apodization.
% aplw - apodization constant in Hz.
% default parameters: datapoint=2048; interval=4E-1;
% MagneticField: 1.5T
%
% parameters out : check - 0 by default.
%
% description : Apodizes FID.
%
% modification :
%
%============================================================================
%===============================================
%data process : import the text ,named as data
%==============================================
[a1,a2,a3,a4]=textread(data,'%f%f%f%f','headerlines',21); %读取数据的数据
a=a1+a2*j; %a=data(:,1)+data(:,2)*j; % signal data
datapoint=2048; %parameters
interval=4E-1;
begtime=0E0;
t = (begtime+(0:interval:(datapoint-1)*interval))/1000; % time
subplot(2 ,1 ,1)
plot(t,real(a));
xlabel('time(s)');
%=============================================
%lorentz or guass ,then apodize
%============================================
%shape='l'; %the function chosed
%aplw=14; %the frequency of function(HZ)
if strcmp(shape,'l') == 1
aposig = exp(-aplw * pi * t);
elseif strcmp(shape,'g') == 1
aposig = exp(-sign(aplw) * aplw * aplw * pi * t .* t);
end
%apodsig(1:2048,1)=aposig(1,1:2048);
fsignal=a.*aposig';
subplot(2 ,1 ,2)
plot(t,real(fsignal));
xlabel('time(s)');
apodize.rar_MRS_apodization_apodize_切趾_核磁
版权申诉
119 浏览量
2022-09-19
15:53:38
上传
评论
收藏 878B RAR 举报
钱亚锋
- 粉丝: 90
- 资源: 1万+
最新资源
- 模拟退火算法matlab代码
- 模拟退火算法matlab代码
- 模拟退火算法matlab代码
- 数字电子时钟课程设计数字电子时钟课程设计
- 数字电子时钟课程设计数字电子时钟课程设计
- 数字电子时钟课程设计数字电子时钟课程设计
- 当然,我将为您提供一个带有详细注释的个人简介网页HTML和CSS代码示例 这将帮助您理解每一部分代码的功能 HTML代码 (
- 当然,我将为您提供一个带有详细注释的个人简介网页HTML和CSS代码示例 这将帮助您理解每一部分代码的功能 HTML代码 (
- 当然,我将为您提供一个带有详细注释的个人简介网页HTML和CSS代码示例 这将帮助您理解每一部分代码的功能 HTML代码 (
- 网络安全odel-for-network-ids-开发笔记
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈