drawing a triangular wave
조회 수: 28 (최근 30일)
이전 댓글 표시
hey guys, what would be the best way to draw a triangular wave?
I just need one triangular wave so my attempt was to draw the left side of the peak of something like y = 2x -8
and right side y = -2x + 8 or something and combine the two, but then I dont know how to make that into one function or graph?
댓글 수: 0
채택된 답변
Salaheddin Hosseinzadeh
2015년 6월 8일
Hi Soloby,
You just asked a question on fuzzy logic, I assume this is in the same area!
Have you tried trimf or trapmf membership functions?
댓글 수: 5
Salaheddin Hosseinzadeh
2015년 6월 8일
편집: Salaheddin Hosseinzadeh
2015년 6월 8일
you made a mistake defining x
x = 1:0.1:10
not
x = 0:10:0.1 % this is wrong
추가 답변 (1개)
Image Analyst
2015년 6월 9일
See my attached demo
% Creates triangle waves two ways, one using repmat() and
% one using sawtooth() from the Signal Processing Toolbox.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177329/image.jpeg)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!