MATLAB Answers

How to create membership functions matlab in triangular form?

4 views (last 30 days)
mindo akami
mindo akami on 9 Jun 2021
Commented: darova on 24 Jul 2021 at 16:36
Hi, hoping somone can help
i add the rule 1 and 2 with trimf function but how can i plot the rule 3 and 4 pleas (see the attched images) thanks )

Answers (1)

darova
darova on 9 Jun 2021
Use sine wave
x = 0:pi/2:20;
y = sin(x);
plot(x,y)
  2 Comments
darova
darova on 24 Jul 2021 at 16:36
Maybe manual solution?
x = [-180 -90 -90 90 90 180];
y = abs(sind(x));
y(3:4) = 0;
plot(x,y)

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!