필터 지우기
필터 지우기

How to make the Blue curve smoother ?

조회 수: 3 (최근 30일)
Eisa Alyaqoub
Eisa Alyaqoub 2019년 10월 5일
댓글: Walter Roberson 2019년 10월 5일
Could anyone help, please ?
I ant to smooth the blue curve insted being with sharp edges ?
I tried the smooth(), but it did not hep.
Capture.PNG
clc;
clear all;
close all;
t=0:20;
V_1=1 - ((1.10625)*(exp(-0.438*t))) + ((0.10625)*(exp(-4.56*t)));
V_2=1+((exp(-0.5*t)).*((-0.9)*(cos(1.323*t))-(0.34)*(sin(1.323*t))));
%V1=smooth(V_2);
plot(t,V_1,'r')
hold on
plot (t,V_2,'b')
legend('OverDamped','UnderDamped')
Thank you in advance.

채택된 답변

Walter Roberson
Walter Roberson 2019년 10월 5일
t=linspace(0,20,100);
  댓글 수: 2
Eisa Alyaqoub
Eisa Alyaqoub 2019년 10월 5일
Thank you for your help.
It works, but could you please explain ?
Walter Roberson
Walter Roberson 2019년 10월 5일
You get sharp plots when you sample a curve far apart compared to how rapidly it is changing. You were sampling only at the integers 0, 1, 2, 3, and so on, which is only 4 3/4 points per cyle of your sin() and cos() of 1.323*t

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by