【物理应用】气象参数计算综合指标和IAQI【含GUI Matlab源码 2116期】

【物理应用】气象参数计算综合指标和IAQI【含GUI Matlab源码 2116期】_第1张图片

⛄一、获取代码方式

获取代码方式1:
完整代码已上传我的资源:【物理应用】基于matlab GUI气象参数计算综合指标和IAQI【含Matlab源码 2116期】
点击上面蓝色字体,直接付费下载,即可。

获取代码方式2:
付费专栏Matlab物理应用(初级版)

备注:
点击上面蓝色字体付费专栏Matlab物理应用(初级版),扫描上面二维码,付费29.9元订阅海神之光博客付费专栏Matlab物理应用(初级版),凭支付凭证,私信博主,可免费获得1份本博客上传CSDN资源代码(有效期为订阅日起,三天内有效);
点击CSDN资源下载链接:1份本博客上传CSDN资源代码

⛄二、空气质量分指数(IAQI)

城市空气质量指数 (AQI) 、点位空气质量指数 (AQI) 每日 (24h) 、每时的计算结果是由测得的几项污染物的日平均值、小时平均值空气质量分指数中最大的值作为每日、每时空气质量的指数和首要污染物, 因此, 想要知道AQI值必须将各项污染物的分指数 (IAQI) 计算出来。

1 空气指数分指数 (IAQI) 计算公式
在这里插入图片描述
IAQIP-污染物项目P的空气质量分指数;
CP-污染物项目P质量浓度值;
BPHi-表1中与CP相近的污染物浓度限值的高位值;
BPLo-表1中与CP相近的污染物浓度限值的低位值;
IAQIHi-表1中与BPHi对应的空气质量分指数;
IAQILo-表1中与BPLo对应的空气质量分指数。

2 分步理解公式含义
2.1 首先理解几个差值的含义

IAQHi-IAQILo的含义是某种浓度污染物在表1中对应的空气质量分指数高、低之差值, 是一个无量纲的数, 它的每一级别值均是一个固定值。

BPHi-BPLo的含义是表1中与某种浓度污染物CP相近的污染物浓度限值的高、低位值之差值, 它的单位与浓度单位一样, 而且它的每一级别值也是一个固定值。

CP–BPLo的含义是表1中与某种污染物浓度与CP相近的污染物浓度限值的低位值之差, 它的单位也是与浓度单位一样, 它不是一个固定的值。

2.2 理解公式右面第一部分的含义
【物理应用】气象参数计算综合指标和IAQI【含GUI Matlab源码 2116期】_第2张图片
2.3 理解公式右面第二部分的含义
公式右面第二部分是+IAQILo, 即加各级别一个起点的指数, 第一部分与第二部分加在一起即可计算出该浓度污染物的空气质量分指数, 即公式左面IAQIP。

⛄三、部分源代码

function varargout = workfun(varargin)
% WORKFUN MATLAB code for workfun.fig
% WORKFUN, by itself, creates a new WORKFUN or raises the existing
% singleton*.
%
% H = WORKFUN returns the handle to a new WORKFUN or the handle to
% the existing singleton*.
%
% WORKFUN(‘CALLBACK’,hObject,eventData,handles,…) calls the local
% function named CALLBACK in WORKFUN.M with the given input arguments.
%
% WORKFUN(‘Property’,‘Value’,…) creates a new WORKFUN or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before workfun_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to workfun_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE’s Tools menu. Choose “GUI allows only one
% instance to run (singleton)”.
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help workfun

% Last Modified by GUIDE v2.5 2-Sep-2022 14:47:08

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name’, mfilename, …
‘gui_Singleton’, gui_Singleton, …
‘gui_OpeningFcn’, @workfun_OpeningFcn, …
‘gui_OutputFcn’, @workfun_OutputFcn, …
‘gui_LayoutFcn’, [] , …
‘gui_Callback’, []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% — Executes just before workfun is made visible.
function workfun_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to workfun (see VARARGIN)

% Choose default command line output for workfun
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes workfun wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% — Outputs from this function are returned to the command line.
function varargout = workfun_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,‘String’) returns contents of edit1 as text
% str2double(get(hObject,‘String’)) returns contents of edit1 as a double
edit1=str2num(get(hObject,‘String’));
if (isempty(edit1))
ste(hObject,‘String’,‘’)
end
guidata(hObject,handles)
% — Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,‘BackgroundColor’), get(0,‘defaultUicontrolBackgroundColor’))
set(hObject,‘BackgroundColor’,‘white’);
end

function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,‘String’) returns contents of edit2 as text
% str2double(get(hObject,‘String’)) returns contents of edit2 as a double
edit2=str2num(get(hObject,‘String’));
if (isempty(edit2))
ste(hObject,‘String’,‘’)
end
guidata(hObject,handles)

% — Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,‘BackgroundColor’), get(0,‘defaultUicontrolBackgroundColor’))
set(hObject,‘BackgroundColor’,‘white’);
end

function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,‘String’) returns contents of edit3 as text
% str2double(get(hObject,‘String’)) returns contents of edit3 as a double
edit3=str2num(get(hObject,‘String’));
if (isempty(edit3))
ste(hObject,‘String’,‘’)
end
guidata(hObject,handles)

% — Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,‘BackgroundColor’), get(0,‘defaultUicontrolBackgroundColor’))
set(hObject,‘BackgroundColor’,‘white’);
end

function edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,‘String’) returns contents of edit4 as text
% str2double(get(hObject,‘String’)) returns contents of edit4 as a double
edit4=str2num(get(hObject,‘String’));
if (isempty(edit4))
ste(hObject,‘String’,‘’)
end

⛄四、运行结果

【物理应用】气象参数计算综合指标和IAQI【含GUI Matlab源码 2116期】_第3张图片

⛄五、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1]刘萍.如何理解空气质量分指数(IAQI)计算公式并速算[J].黑龙江环境通报. 2014,38(02)

3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除

你可能感兴趣的:(Matlab物理应用(初级版),matlab)