How an i create a periodic triangular signal and its TFD ?

6 ビュー (過去 30 日間)
Maria
Maria 2014 年 2 月 13 日
編集済み: Maria 2014 年 2 月 20 日
Hey,
How an i create a periodic triangular signal with T its period ? i need to have the triangle to pass by zero. Than i want to show its fourrier transform.
thank you
  2 件のコメント
Walter Roberson
Walter Roberson 2014 年 2 月 13 日
What should be the upper and lower limits for the triangle?
Maria
Maria 2014 年 2 月 14 日
編集済み: Maria 2014 年 2 月 18 日
Actually i want to understand the way i can create a triangular wave form with special period. I tried two methods, the first is :
t= -4:4; y = (-1).^t; figure(1) plot(t,y); and the second one is :
fs = 1; t = -10:1/fs:10; w = 20; x = tripuls(t,w); figure(2) plot(t,x) I know that i need the lower a and upper b limits and the parameter c may help me. for a perfect triangular c = (a+b)/2.
I wish to understand how to create triangular wave with a (0,1) and b (20,1) and the c (10,1).
Thanks for helping figure(1) plot(t,y);
and the second one is :
fs = 1;
t = -10:1/fs:10;
w = 20;
x = tripuls(t,w);
figure(2)
plot(t,x)
I know that i need the lower a and upper b limits and the parameter c may help me. for a perfect triangular c = (a+b)/2.
I wish to understand how to create triangular wave with a (0,1) and b (20,1) and the c (10,1).
Thanks for helping

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2014 年 2 月 18 日
See demo attached that creates triangle wave.
  1 件のコメント
Maria
Maria 2014 年 2 月 20 日
編集済み: Maria 2014 年 2 月 20 日
Thx for this answer, i want to ask u too the way i can increase the number of my points and have the same amplitude. for exp and always from your script (thx again):) modified : for the second triangle (red one), i need to have an amplitude of 5 but having 10 elements so lets say 10 points for the rising for a period almost half the first. thanks

サインインしてコメントする。

その他の回答 (1 件)

Maria
Maria 2014 年 2 月 19 日
Thank you very much :)

カテゴリ

Help Center および File ExchangeTime-Frequency Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by