模糊统计试验_第1页
模糊统计试验_第2页
模糊统计试验_第3页
模糊统计试验_第4页
模糊统计试验_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、精选优质文档-倾情为你奉上模糊统计试验 模糊数学是近十几年来发展很迅速的一个数学分支,模糊集合是隶属函数描述的,以隶属函数建立了模糊集合论。因此隶属函数的确定在模糊数学的应用中占有极为重要的地位。怎样确定隶属函数u是一个关键的问题,本实验通过模糊统计实验来确定隶属函数,而且只能建立近似的隶属函数是否符合实际直接影响效果的好坏。在本实验中,我们还对模糊统计加以改进,提出了更切实际的模糊统计算法。1.实验目的(1)掌握模糊统计方法。设在模糊统计试验中,样本空间为n,计算 (1) 随着n的增大,隶属频率会呈现出稳定,称之为隶属频率的稳定性。(2)学习利用模糊统计方法确定“青年人”这一模糊集的隶属函数

2、。这个稳定的数称为u的隶属度。由此来我们来确定隶属函数。(3)学习利用MATLAB软件实现确定“青年人”隶属函数的模型。(4)学习改进的模糊统计,得到更切实际的隶属函数。2.实验内容 以人的年龄作为论域。随机抽取129个大学生,在独立认真考虑“青年人”的含义之后,给出各自的答案,形成129个“青年人”的年龄段。关于青年人调查表1825173017281825163514251830183518351625153018351735182518351825203018301630203518301830152528301528162828301830163018351825182516281830

3、163016281835183517271628152816301928153015261725153618301730183516351525152518281630152818351830172818351528183015251525183016241525163215271835162518281628183018351830183017301830183516301835172515301825173014251826182918351828183018251635172918251730162818301628153015351530203020301625173015301830

4、16301828183516301530183518351830173016351730152518351530152515301830172518291828根据上述统计的数据,建立“青年人”这一模糊集合的隶属函数,并绘制模糊统计频率图。3实验方法3.1 问题的分析 本实验为利用模糊统计的方法来确定“青年人”的隶属函数。在确定“青年人”的隶属函数的实验中,年龄的论域取为,需要确定U的每一个年龄u隶属于M的程度。实验时,每次明确M的一个区间,一些区间可能不包含u,最后可用实验中得到的包含u的区间数除总实验次数作为u的隶属于M的程度。这样就得到各个年龄的隶属度,根据隶属度画出这个隶属函数的图像。

5、 通过上述模糊统计方法描出“青年人”这一模糊集隶属函数的大致曲线,将它与常见的模糊分布曲线比较,选择最接近的一个,再根据实际确定符合实际的参数。这样,就很容易的写出隶属函数的表达式。3.2 模型求解3.2.1 MATLAB程序functionvarargout = FuzzyMath(varargin)% FUZZYMATH MATLAB code for FuzzyMath.fig% FUZZYMATH, by itself, creates a new FUZZYMATH or raises the existing% singleton*.% H = FUZZYMATH returns

6、the handle to a new FUZZYMATH or the handle to% the existing singleton*.% FUZZYMATH('CALLBACK',hObject,eventData,handles,.) calls the local% function named CALLBACK in FUZZYMATH.M with the given input arguments.% FUZZYMATH('Property','Value',.) creates a new FUZZYMATH or rais

7、es the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before FuzzyMath_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to FuzzyMath_OpeningFcn via varargin.% *See GUI Options o

8、n 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 FuzzyMath% Last Modified by GUIDE v2.5 25-Nov-2013 22:31:02% Begin initialization code - DO NOT EDITgui_Singleton =

9、 1;gui_State = struct('gui_Name', mfilename, .'gui_Singleton', gui_Singleton, .'gui_OpeningFcn', FuzzyMath_OpeningFcn, .'gui_OutputFcn', FuzzyMath_OutputFcn, .'gui_LayoutFcn', , .'gui_Callback', );ifnargin&&ischar(varargin1)gui_State.gui_Callba

10、ck = str2func(varargin1);endifnargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);elsegui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT% - Executes just before FuzzyMath is made visible.functionFuzzyMath_OpeningFcn(hObject, eventdata, handles, varargin)% This fu

11、nction 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 FuzzyMath (see VARARGIN)% Choose default command line output for Fuzzy

12、Mathhandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes FuzzyMath wait for user response (see UIRESUME)% uiwait(handles.figure1);% - Outputs from this function are returned to the command line.functionvarargout = FuzzyMath_OutputFcn(hObject, eventdata, handles

13、) % 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 structurevarargout1 = handles.outp

14、ut;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% str2doubl

15、e(get(hObject,'String') returns contents of edit1 as a doubleinput = str2num(get(hObject,'String'); if (isempty(input)set(hObject,'String','0')endguidata(hObject, handles);% - Executes during object creation, after setting all properties.function edit1_CreateFcn(hObje

16、ct, 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.ifispc&&

17、;isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')set(hObject,'BackgroundColor','white');endfunction edit2_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version

18、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 doubleinput = str2num(get(hObject,'String'); if (isempty(input)set(hObject,&#

19、39;String','0')endguidata(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 - handl

20、es not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')set(hObject,'BackgroundColor','white

21、9;);end% - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)ax=get(handles.edit1,&#

22、39;String');bx=get(handles.edit2,'String');a = str2num(ax);b = str2num(bx);data=get(handles.uitable1,'data');globalflg;global da;data(flg+1,:)=a,b;set(handles.uitable1,'data',data);flg=flg+1;da=data;guidata(hObject, handles);% - Executes on button press in pushbutton2.fun

23、ction pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)globalflg;global da;flg=0;function edit3_Callback(hObject, eventdata, handles

24、)% 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 ed

25、it3 as a doubleinput = str2num(get(hObject,'String'); if (isempty(input)set(hObject,'String','0')endguidata(hObject, handles);% - Executes during object creation, after setting all properties.function edit3_CreateFcn(hObject, eventdata, handles)% hObject handle to edit3 (see

26、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.ifispc&&isequal(get(hObject,'BackgroundColor'), get(0

27、,'defaultUicontrolBackgroundColor')set(hObject,'BackgroundColor','white');end% - Executes on button press in pushbutton3.function pushbutton3_Callback(hObject, eventdata, handles)% hObject handle to pushbutton3 (see GCBO)% eventdata reserved - to be defined in a future versio

28、n of MATLAB% handles structure with handles and user data (see GUIDATA)global da;da1=cell2mat(da);da1=da1'y1 y2=size(da1);w=get(handles.edit3,'String');ww = str2num(w);Ax=0;for j=1:y2if(ww>=da1(1,j)&ww<=da1(2,j) Ax= Ax+1;endendAx=Ax/y2;ax=num2str(Ax);set(handles.text8,'String',ax);guidata(hObject, handles);function pushbutton6_Callback(hObject, eventdata, handles)% hObject handle to pushbutton6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and us

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论