Fuzzy Logic Toolbox: Lecture # 6 CECOS University
Fuzzy Logic Toolbox: Lecture # 6 CECOS University
The Basic Tipping Problem. Given a number between 0 and 10 that represents the quality of service at a restaurant (where 10 is excellent), and another number between 0 and 10 that represents the quality of the food at that restaurant (again, 10 is excellent), what should the tip be?
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. We'll assume that an average tip is 15%, a generous tip is 25%, and a cheap tip is 5%. It's also useful to have a vague idea of what the tipping function should look like.
FIS Editor
17
Evaluate tipper
>> a = readfis('tipper'); >> evalfis([1 2], a)
ans = 5.5586