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!