模糊統(tǒng)計(jì)試驗(yàn)_第1頁(yè)
模糊統(tǒng)計(jì)試驗(yàn)_第2頁(yè)
模糊統(tǒng)計(jì)試驗(yàn)_第3頁(yè)
模糊統(tǒng)計(jì)試驗(yàn)_第4頁(yè)
模糊統(tǒng)計(jì)試驗(yàn)_第5頁(yè)
已閱讀5頁(yè),還剩7頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、模糊統(tǒng)計(jì)試驗(yàn)?zāi):龜?shù)學(xué)是近十幾年來(lái)發(fā)展很迅速的一個(gè)數(shù)學(xué)分支, 模糊集合是隸屬函數(shù)描述的,以隸屬函數(shù)建立了模糊集合論。因此隸屬函數(shù)的確定在模糊數(shù)學(xué)的應(yīng)用中占有極為重要的地位。怎樣確定隸屬函數(shù) u u是一個(gè)關(guān)鍵的問(wèn)題,本實(shí)驗(yàn)通過(guò)模糊統(tǒng)計(jì)實(shí)驗(yàn)來(lái)確定隸屬函數(shù),而且只能建立近似的隸屬函數(shù)是否符合實(shí)際直接影響效果的好壞。在本實(shí)驗(yàn)中,我們還對(duì)模糊統(tǒng)計(jì)加以改進(jìn),提出了更切實(shí)際的模糊統(tǒng)計(jì)算法。1.實(shí)驗(yàn)?zāi)康?1)(1)掌握模糊統(tǒng)計(jì)方法。設(shè)在模糊統(tǒng)計(jì)試驗(yàn)中,樣本空間為 n,n,計(jì)算u 對(duì) A 的隸屬頻率=u-A的次數(shù)(1)(1)n隨著 n n 的增大,隸屬頻率會(huì)呈現(xiàn)出穩(wěn)定,稱(chēng)之為隸屬頻率的穩(wěn)定性。(2)(2)學(xué)習(xí)利用

2、模糊統(tǒng)計(jì)方法確定“青年人”這一模糊集的隸屬函數(shù)。這個(gè)穩(wěn)定的數(shù)稱(chēng)為 u u 的隸屬度。由此來(lái)我們來(lái)確定隸屬函數(shù)。(3)(3)學(xué)習(xí)利用 MATLABMATLAB 軟件實(shí)現(xiàn)確定“青年人”隸屬函數(shù)的模型。(4)(4)學(xué)習(xí)改進(jìn)的模糊統(tǒng)計(jì),得到更切實(shí)際的隸屬函數(shù)。2.實(shí)驗(yàn)內(nèi)容以人的年齡作為論域U=0,100】。隨機(jī)抽取 129129 個(gè)大學(xué)生,在獨(dú)立認(rèn)真考慮“青年人”的含義之后,給出各自的答案,形成 129129 個(gè)“青年人”的年齡段關(guān)于青年人調(diào)查表18-2517-3017-2818-2516-3514-2518-3018-3518-3516-25153018-3517-3518-2518-3518-25

3、20-3018-3016-3020-35183018-3015-2528-3015-2816-2828-3018-3016-3018-3518-2518-2516-2818-3016-3016-2818-3518-3517-2716-2815-2816-3019-2815-3015-2617-2515-3618-3017-3018-3516-3515-2515-2518-2816-3015-2818-3518-3017-2818-3515-2818-3015-2515-2518-3016-2415-2516-3215-2718-3516-2518-2816-2818-3018-3518-301

4、8-3017-3018-3018-3516-3018-3517-2515-3018-2517-3014-2518-2618-2918-3518-2818-3018-2516-3517-2918-2517-3016-2818-3016-2815-3015-3515-3020-3020-3016-2517-3015-301-83016-3018-2818-3516-3015-3018-3518-3518-3017-3016-3517-3015-2518-3515-3015-2515-3018-3017-2518-2918-28根據(jù)上述統(tǒng)計(jì)的數(shù)據(jù),建立“青年人”這一模糊集合的隸屬函數(shù),并繪制模糊統(tǒng)計(jì)

5、頻率圖3實(shí)驗(yàn)方法3.13.1 問(wèn)題的分析本實(shí)驗(yàn)為利用模糊統(tǒng)計(jì)的方法來(lái)確定“青年人”的隸屬函數(shù)。在確定“青年人”的隸屬函數(shù)的實(shí)驗(yàn)中,年齡的論域取為U=b,i00,需要確定 U U 的每一個(gè)年齡 u u 隸屬于 M M 的程度。實(shí)驗(yàn)時(shí),每次明確 M M 的一個(gè)區(qū)間,一些區(qū)間可能不包含 u,u,最后可用實(shí)驗(yàn)中得到的包含 u u 的區(qū)間數(shù)除總實(shí)驗(yàn)次數(shù)作為 u u的隸屬于 M M 的程度。這樣就得到各個(gè)年齡的隸屬度,根據(jù)隸屬度畫(huà)出這個(gè)隸屬函數(shù)的圖像。通過(guò)上述模糊統(tǒng)計(jì)方法描出“青年人”這一模糊集隸屬函數(shù)的大致曲線(xiàn),將它與常見(jiàn)的模糊分布曲線(xiàn)比較,選擇最接近的一個(gè),再根據(jù)實(shí)際確定符合實(shí)際的參數(shù)。這樣,就很容易

6、的寫(xiě)出隸屬函數(shù)的表達(dá)式。3.23.2 模型求解3.2.13.2.1 MATLABMATLAB 程序functionvarargout=FuzzyMath(varargin)%FUZZYMATHMATLABcodeforFuzzyMath.fig%FUZZYMATH,byitself,createsanewFUZZYMATHorraisestheexisting%singleton*.%H=FUZZYMATHreturnsthehandletoanewFUZZYMATHorthehandleto%theexistingsingleton*.%FUZZYMATH(CALLBACK,hObject,

7、eventData,handles,.)callsthelocal%functionnamedCALLBACKinFUZZYMATH.Mwiththegiveninputarguments.%FUZZYMATH(Property,Value,.)createsanewFUZZYMATHorraisesthe%existingsingleton*.Startingfromtheleft,propertyvaluepairsare%appliedtotheGUIbeforeFuzzyMath_OpeningFcngetscalled.An%unrecognizedpropertynameorinv

8、alidvaluemakespropertyapplication%stop.AllinputsarepassedtoFuzzyMath_OpeningFcnviavarargin.%*SeeGUIOptionsonGUIDEsToolsmenu.ChooseGUIallowsonlyone%instancetorun(singleton).%Seealso:GUIDE,GUIDATA,GUIHANDLES%EdittheabovetexttomodifytheresponsetohelpFuzzyMath%LastModifiedbyGUIDEv2.525-Nov-201322:31:02%

9、Begininitializationcode-DONOTEDITgui_Singleton=1;gui_State=struct(gui_Singletongui_OpeningFcngui_OutputFcngui_LayoutFcngui_Callbackgui_Namemfilename,gui_Singleton,.,FuzzyMath_OpeningFcn,FuzzyMath_OutputFcn,,口,.,);ifnargin&ischar(varargin1)gui_State.gui_Callback=str2func(varargin1);endifnargoutva

10、rargout1:nargout=gui_mainfcn(gui_State,varargin:);elsegui_mainfcn(gui_State,varargin:);end%Endinitializationcode-DONOTEDIT%-ExecutesjustbeforeFuzzyMathismadevisible.functionFuzzyMath_OpeningFcn(hObject,eventdata,handles,varargin)%Thisfunctionhasnooutputargs,seeOutputFcn.%hObjecthandletofigure%eventd

11、atareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%varargincommandlineargumentstoFuzzyMath(seeVARARGIN)%ChoosedefaultcommandlineoutputforFuzzyMathhandles.output=hObject;%Updatehandlesstructureguidata(hObject,handles);%UIWAITmakesFuzzyMathwaitforuserres

12、ponse(seeUIRESUME)%uiwait(handles.figure1);%-Outputsfromthisfunctionarereturnedtothecommandline.functionvarargout=FuzzyMath_OutputFcn(hObject,eventdata,handles)%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);%hObjecthandletofigure%eventdatareserved-tobedefinedinafutureversionofMATLAB%handles

13、structurewithhandlesanduserdata(seeGUIDATA)%Getdefaultcommandlineoutputfromhandlesstructurevarargout1=handles.output;functionedit1_Callback(hObject,eventdata,handles)%hObjecthandletoedit1(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA

14、)%Hints:get(hObject,String)returnscontentsofedit1astext%str2double(get(hObject,String)returnscontentsofedit1asadoubleinput=str2num(get(hObject,String);if(isempty(input)set(hObject,String,0)endguidata(hObject,handles);%-Executesduringobjectcreation,aftersettingallproperties.functionedit1_CreateFcn(hO

15、bject,eventdata,handles)%hObjecthandletoedit1(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.%SeeISPCandCOMPUTER.ifispc&isequal(get(hObject,BackgroundColor),get(0,def

16、aultUicontrolBackgroundColor)set(hObject,BackgroundColor,white);endfunctionedit2_Callback(hObject,eventdata,handles)%hObjecthandletoedit2(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Hints:get(hObject,String)returnscontentsofedit2a

17、stext%str2double(get(hObject,String)returnscontentsofedit2asadoubleinput=str2num(get(hObject,String);if(isempty(input)set(hObject,String,0)endguidata(hObject,handles);%-Executesduringobjectcreation,aftersettingallproperties.functionedit2_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit2(seeG

18、CBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcns%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.%SeeISPCandCOMPUTER.ifispc&isequal(get(hObject,BackgroundColor),get(0,defaultUicontrolBackgroundColor)calledset(hObject,Backgroun

19、dColor,white);end%-Executesonbuttonpressinpushbutton1.functionpushbutton1_Callback(hObject,eventdata,handles)%hObjecthandletopushbutton1(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)ax=get(handles.edit1,String);bx=get(handles.edit2,

20、String);a=str2num(ax);b=str2num(bx);data=get(handles.uitable1,data);globalflg;globalda;data(flg+1,:)=a,b;set(handles.uitable1,data,data);flg=flg+1;da=data;guidata(hObject,handles);%-Executesonbuttonpressinpushbutton2.functionpushbutton2_Callback(hObject,eventdata,handles)%hObjecthandletopushbutton2(

21、seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)globalflg;globalda;flg=0;functionedit3_Callback(hObject,eventdata,handles)%hObjecthandletoedit3(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesa

22、nduserdata(seeGUIDATA)%Hints:get(hObject,String)returnscontentsofedit3astext%str2double(get(hObject,String)returnscontentsofedit3asadoubleinput=str2num(get(hObject,String);if(isempty(input)set(hObject,String,0)endguidata(hObject,handles);%-Executesduringobjectcreation,aftersettingallproperties.funct

23、ionedit3_CreateFcn(hObject,eventdata,handles)%hObjecthandletoedit3(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesempty-handlesnotcreateduntilafterallCreateFcns%Hint:editcontrolsusuallyhaveawhitebackgroundonWindows.%SeeISPCandCOMPUTER.ifispc&isequal(get(hObject,BackgroundC

24、olor),get(0,defaultUicontrolBackgroundColor)set(hObject,BackgroundColor,white);end%-Executesonbuttonpressinpushbutton3.functionpushbutton3_Callback(hObject,eventdata,handles)%hObjecthandletopushbuttons(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserd

25、ata(seeGUIDATA)globalda;da1=cell2mat(da);da1=da1;y1y2=size(da1);w=get(handles.edit3,String);ww=str2num(w);Ax=0;forj=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);functionpushbutton6_Callback(hObject,eventdata,handles)%hO

26、bjecthandletopushbutton6(seeGCBO)%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)globalda;da1=cell2mat(da);da1=da1;y1y2=size(da1);A1=da1(1,1);A2=da1(1,1);fori=1:1:y2if(da1(1,i)A2)A2=da1(2,i);endendx=1:(A2-A1)/100:100;Ax=;fori=1:1:length(x)calledAx(i)=0;forj=1:y2if(x(i)=da1(1,j)&x(i)=da1(2,j)Ax(i)=Ax(i)+1;endendAx(i)=Ax(i)/y2;endplot(x,Ax)axe

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論