plots periodics functions and fourier transform

3 ビュー (過去 30 日間)
Rotem
Rotem 2012 年 10 月 7 日
how can I plot a periodic function like e^-abs(z) while -T1<z<T1 and 0 else? if my cycle is L = T0
  3 件のコメント
Rotem
Rotem 2012 年 10 月 7 日
編集済み: Rotem 2012 年 10 月 7 日
I tried this if true for i = 1:Cycle_Num t0 = linspace((i-1)*L - i*L,(i-1)*L - i*T1,1000); t1 = linspace((i-1)*L- i*T1,(i-1)*L + i*T1,1000); t2 = linspace((i-1)*L + i*T1,(i-1)*L + i*L,1000); plot(subs(func0,t0)); plot(subs(func1,t1)); plot(subs(func0,t2)); end end
Matt J
Matt J 2012 年 10 月 7 日
Please format your code (using the '{} Code' toolbar icon), so that we can read it more easily.

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

採用された回答

Matt J
Matt J 2012 年 10 月 7 日
This might be what you're looking for:
T1=10;
T0=6;
h=T0/2;
f=@(z) exp(-abs(z));
p=@(t) mod(t-h,2*h)-h;
t=linspace(-T1,T1,1000);
plot(t,f(p(t)));
  6 件のコメント
Rotem
Rotem 2012 年 10 月 7 日
its zero every thing except the limit of abs(z)<= T1 and I can now add another function to that one which define the rest of the t axe
Rotem
Rotem 2012 年 10 月 7 日
thanks a lot

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by