필터 지우기
필터 지우기

How can plot integral for sin wave

조회 수: 7 (최근 30일)
face wasd
face wasd 2013년 6월 14일
Iam plot integral for sin wave in simulink ,the form the signal positive and the amplitude from 0 to 2 ????

답변 (1개)

Wayne King
Wayne King 2013년 6월 14일
Use the integrator block. If you attached a sine wave block to an integrator block (in the Continuous library), you will get what you want. In MATLAB code, you will get
t = 0:0.01:(2*pi);
x = sin(t);
dt = t(2)-t(1);
y = cumsum(x.*dt);
plot(t,x); hold on;
plot(t,y,'r')
Or you can use the x above and put that in a "From Workspace block"

카테고리

Help CenterFile Exchange에서 General Applications에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by