drawing a triangular wave
31 次查看(过去 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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Clustering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!