Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alpha=20;
- betaa = 30;
- gammaa = 40;
- delta = 45;
- for i=1:10
- x(i) = i*5
- if x(i)<=alpha
- y(i)=0;
- elseif x(i)<=betaa
- y(i) = (x(i)-alpha)/(betaa-alpha)
- elseif x(i) <=gammaa
- y(i) = 1;
- elseif x(i) <= delta
- y(i)=(delta-x(i))/(delta-gammaa);
- else
- y(i) = 0;
- end
- end
- plot(x,y)
Add Comment
Please, Sign In to add comment