フィルターのクリア

Plotting trigonometric, negative exponential functions

4 ビュー (過去 30 日間)
Mos_bad
Mos_bad 2020 年 6 月 20 日
コメント済み: Mos_bad 2020 年 6 月 22 日
My question could be more related to math than Matlab, but since I want to plot them in matlab, I am asking it here.
I attached the functions that I'm trying to plot.
My Questions are:
1) why my trigonometric function is different from the attached? mine doesn't look like sine and cosine functions at all.
2) how to plot negative exponential function?
Here is my code:
t=1:1:100;
to=1;
th=t(end)-t(1);
b_l=0.2; a_l=1-b_l; % linear coeff
a_t=0.2; b_t=acos(2/a_t)/pi(); % trigonometric coeff
a_e = 0.2; b_e=-log(1/a_e); %exponential coeff
y1 = a_e * exp(-b_e*(t-to)/(th-to)); % exponential
y2 = a_l*((t-to)/(th-to)) + b_l; % linear
y3 = (a_t/2)*( 1 + cos( (pi().*(t-to)*b_t)/(th-to) ) ); % Trigonometric
figure(1);
plot(t,y1,'-k','LineWidth',3); hold on;
plot(t,y2,'-r','LineWidth',3); hold on;
plot(t,y3,'-m','LineWidth',3); hold on;
legend('Exponential','Linear','Trigonometric','FontSize',14,'FontName','Time New Roman','Location','NorthWest');
  3 件のコメント
John D'Errico
John D'Errico 2020 年 6 月 20 日
編集済み: John D'Errico 2020 年 6 月 20 日
@Mos_bad
Please don't answer your own question just to make a comment. Use a comment instead.
"Here are the math expressions that I found:
f_trigonometric (t) = (a/2) [1+cos( (πb (t-to))/(th- to )) ]
f_exponential (t)=a e^[(-b(t - to))/(th- to )]
and a and b are constants. the to and th in expression are equivalent to t0e and t0e+Tlc in attached figure, respectively.
And for negative exponential function, I don't have any math expression. I just found the attached plot in litrature.
0 Comments"
Mos_bad
Mos_bad 2020 年 6 月 22 日
Any body can help me with this?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscrete Data Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by