資源簡(jiǎn)介
MATLAB熒光光譜數(shù)據(jù)處理程序。根據(jù)光譜數(shù)據(jù)用MATLAB畫(huà)圖(包括三維熒光光譜圖、等高線(xiàn)圖、激發(fā)光譜圖、發(fā)射光譜圖)。最后得出定量測(cè)量曲線(xiàn),回歸方程和相關(guān)系數(shù)。

代碼片段和文件信息
clear;clc;
EX=230:5:400;????????%35個(gè)
EM=250:1:500;????????%251個(gè)
[MN]=meshgrid(EXEM);
fid=fopen(‘chy3.txt‘);
A=textscan(fid‘%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f‘‘headerlines‘9);?%將其前9行內(nèi)容去除
fclose(fid);
for?i=2:36????????????????????????%將存在細(xì)胞矩陣A中的數(shù)據(jù)存到矩陣C中
????C(:i-1)=A{i};
end
C(isnan(C))?=?0;??????????????????%NAN無(wú)數(shù)據(jù)處等于0
figure(‘color‘‘white‘);
subplot(221);
surf(MNC);
xlabel(?‘\fontname{宋體}激發(fā)波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5‘Rotation‘18);
ylabel(‘\fontname{宋體}發(fā)射波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5‘Rotation‘-15);
zlabel(‘\fontname{宋體}相對(duì)熒光強(qiáng)度\fontname{Times?New?Roman}(a.u.)‘‘FontSize‘10.5);
title(‘初始三維熒光光譜圖‘);
grid?on;
shading?interp;???????????????????%平滑效果
subplot(222);???????????????????%畫(huà)等高線(xiàn)圖
contour(MNC20);
xlabel(?‘\fontname{宋體}激發(fā)波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5);
ylabel(‘\fontname{宋體}發(fā)射波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5);
title(‘初始等高線(xiàn)圖‘);
grid?on;
subplot(223);
plot(EXC);???????????????????????%畫(huà)出激發(fā)波長(zhǎng)與熒光強(qiáng)度關(guān)系
grid?on;
xlabel(‘\fontname{宋體}激發(fā)波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5);
ylabel(‘\fontname{宋體}相對(duì)熒光強(qiáng)度\fontname{Times?New?Roman}(a.u.)‘‘FontSize‘10.5);
title(‘初始激發(fā)光譜圖‘);
subplot(224);
plot(EMC);???????????????????????%畫(huà)發(fā)射波長(zhǎng)與熒光強(qiáng)度關(guān)系
grid?on
xlabel(‘\fontname{宋體}發(fā)射波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5);
ylabel(‘\fontname{宋體}相對(duì)熒光強(qiáng)度\fontname{Times?New?Roman}(a.u.)‘‘FontSize‘10.5);
title(‘初始發(fā)射光譜圖‘);
%消除拉曼散射
fid=fopen(‘xbendi.txt‘);
B=textscan(fid‘%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f?%f‘‘headerlines‘9);?%將其前9行內(nèi)容去除
fclose(fid);
for?i=2:36????????????????????????%將存在細(xì)胞矩陣A中的數(shù)據(jù)存到矩陣C中
????D(:i-1)=B{i};
end
D(isnan(D))?=?0;??????????????????%NAN無(wú)數(shù)據(jù)處等于0
figure(‘color‘‘white‘);
subplot(121);?
surf(MND);
xlabel(?‘\fontname{宋體}激發(fā)波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5‘Rotation‘18);
ylabel(‘\fontname{宋體}發(fā)射波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5‘Rotation‘-15);
zlabel(‘\fontname{宋體}相對(duì)熒光強(qiáng)度\fontname{Times?New?Roman}(a.u.)‘‘FontSize‘10.5);
title(‘溶劑SDS的Raman散射光譜‘);
grid?on;
shading?interp;
subplot(122);????????????????%畫(huà)等高線(xiàn)圖
contour(MND20);
xlabel(?‘\fontname{宋體}激發(fā)波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5);
ylabel(‘\fontname{宋體}發(fā)射波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5);
title(‘溶劑SDS的Raman散射等高線(xiàn)圖‘);
grid?on;
figure(‘color‘‘white‘)
subplot(121);
contour(MNC20);
xlabel(?‘\fontname{宋體}激發(fā)波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5);
ylabel(‘\fontname{宋體}發(fā)射波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5);
grid?on;
title(‘未消除拉曼散射‘);
A1=C-D;
subplot(122);
contour(MNA120);
xlabel(?‘\fontname{宋體}激發(fā)波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5);
ylabel(‘\fontname{宋體}發(fā)射波長(zhǎng)\fontname{Times?New?Roman}(nm)‘‘FontSize‘10.5);
grid?on;
title(‘消除拉曼散射后‘);
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件???????63429??2013-01-22?17:30??熒光光譜分析\chy1.txt
?????文件???????63429??2013-01-22?17:30??熒光光譜分析\chy2.txt
?????文件???????63429??2013-01-22?17:30??熒光光譜分析\chy3.txt
?????文件???????63429??2013-01-22?17:30??熒光光譜分析\chy4.txt
?????文件????????5399??2016-04-13?19:31??熒光光譜分析\main.m
?????文件????????3372??2016-04-13?17:47??熒光光譜分析\main2.m
- 上一篇:心電圖自動(dòng)診斷
- 下一篇:MATLAB基于室內(nèi)定位算法的研究
評(píng)論
共有 條評(píng)論