フィルターのクリア

How to integrate cosine wave in MATLAB?

6 ビュー (過去 30 日間)
ANANTA BIJOY BHADRA
ANANTA BIJOY BHADRA 2022 年 10 月 21 日
回答済み: Star Strider 2022 年 10 月 21 日
I have a cosine wave of 50Hz and and 1000 Amplitude. It is a AC voltage. I need to integrate it. I know that it would be the sine wave but i don't how to makethat. I have written the cosine wave part which is given below:
clc
clear
f=50;
a=1000;
dt=0:1e-6:40e-3;
V1=a*cos(2*pi*f*dt);
plot(V1)
How can I do the integration after that?

採用された回答

Star Strider
Star Strider 2022 年 10 月 21 日
One way to ingegrate the ‘V1’ vector is to use cumtrapz
f=50;
a=1000;
dt=0:1e-6:40e-3;
V1=a*cos(2*pi*f*dt);
figure
plot(dt,V1)
V1i = cumtrapz(dt,V1);
figure
plot(dt,V1i)
.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by