matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... ·...

30
MATLAB : 1 - ................................ ................................ ................................ .................... 3 1 - 1 - ................................ .............................. 6 1 - 2 - ................................ ................................ ................................ ............... 6 2 - ................................ ................................ ........................... 8 2 - 1 - : ................................ ................................ ................................ ........... 10 2 - 2 - : ................................ ................................ ......... 10 2 - 3 - : ................................ ................................ ................................ 12 2 - 4 - : ................................ ................................ .............................. 13 3 - ................................ ................................ ................................ . 15 3 - 1 - ................................ ................................ ....... 18 3 - 2 - ................................ ................................ 20 4 - ................................ ................................ ................................ 23 5 - Rule Surface ................................ ................................ ............................. 27 6 - ................................ ................................ ................................ ........... 28 matlab1.ir

Transcript of matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... ·...

Page 1: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

1-....................................................................................................................31-1-..............................................................61-2-...............................................................................................................6

2-...........................................................................................82-1-:...........................................................................................................102-2-:.........................................................................102-3-:................................................................................................122-4-:..............................................................................................13

3-.................................................................................................153-1-.......................................................................183-2-................................................................20

4-................................................................................................235-Rule Surface.............................................................................................276-...........................................................................................................28

matlab1.ir

Page 2: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

1- .

.

.

.

.

.

.

fuzzy1965

.

fuzzy

.fuzzy

Page 3: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

fuzzy

fuzzy

.

70

.feed back) (

.

: ...

.

fuzzy .

.

fuzzy

.fuzzy .

fuzzy

Page 4: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

.

.fuzzy

.

.

"""

")

(

.

fuzzy

1-

) (feed back

.

2-fuzzy

.

3-fuzzy

.

.

4-fuzzy

Page 5: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

fuzzy

fuzzy :"

".

5-fuzzy

.

1973fuzzy

.

: .fuzzy

. :)(

)()()() .(

.

) ()(

.

fuzzy

.fuzzy

fuzzy .

Page 6: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

fuzzy .fuzzy

100 .

.

fuzzy.

fuzzy

fuzzy

.fuzzy

.fuzzy

.fuzzy

.

fuzzy

fuzzyfuzzyfuzzy

fuzzy. ...

fuzzy

.fuzzy

.

Page 7: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

2 - ..

1. If the service is poor or the food is rancid, then tip is cheap.

2. If the service is good, then tip is average.

3. If the service is excellent or the food is delicious, then tip is generous.

MATLAB.

>> fuzzy.

MATLAB Workspace

.

.

Page 8: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

:

1 :.

2:

.

3:.

4:

.

5:.

6:.

7:.

8:.

Page 9: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

) (.

>> fuzzy tipper

.

.

.

>> fuzzy

2 .

.

.

.

.

1. If the service is poor or the food is rancid, then tip is cheap.

1 ..

2. If the service is good, then tip is average.

2 .

3. If the service is excellent or the food is delicious, then tip is generous.

1 ..

fuzzy.

Page 10: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

. .

..

Page 11: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

input2 ..

.

.

.

Name.

.

Input1service.

Page 12: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

Input2foodoutput1tip .

.

.

Page 13: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

. .(tipper)

.

Page 14: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

3-.

.

.

Page 15: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

.

service.

.

Page 16: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

1 :.

2 :

.

3 :.

4: .

.

5 :.

6:.

7:.

8 :.

Page 17: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

9:.

10:.

11:.

.

.

Page 18: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

.

.

Page 19: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

..

2.

Page 20: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

.4.

3gbellmf.

..

Page 21: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

dsigmfpsigmf ..

.Zmfsmfpimf.

Page 22: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

. .

fuzzy partitioning).(pimf .

.

.

4 -..

>> ruleedit

.

Page 23: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

.

1. If the service is poor or the food is rancid, then tip is cheap.

Add Rule .

.

Page 24: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

.

2. If the service is good, then tip is average.

Add rule .

.

Page 25: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

3. If the service is excellent or the food is delicious, then tip is generous.

Page 26: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

.

.Rule

surface .

5-Rule Surface.

.

Page 27: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

.

.

.

6-.

Page 28: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

.

.=

:

Service = 7 , food = 7 => tip = ?

Page 29: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

:

Tip = 17.8

:

Service = 3 , food = 8.5

tip.

Page 30: matlab1 - Ferdowsi University of Mashhadfumblog.um.ac.ir/gallery/771... · :MATLAB-21.Iftheserviceispoororthefoodisrancid,thentipischeap. 2.Iftheserviceisgood,thentipisaverage. 3.Iftheserviceisexcellentorthefoodisdelicious,thentipisgenerous.

MATLAB :

tip

Tip = 18.7