필터 지우기
필터 지우기

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 CenterFile Exchange에서 Discrete Data Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by