t = 0:0.01:10
for vs = 3.*exp(-t /3).*sin(pi*t)
if (vs <= 0)
vl = 0;
else
vl = vs;
end
end
plot(t,vl)
title('Load voltage vs Time')

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 3 月 21 日
編集済み: Azzi Abdelmalek 2016 年 3 月 21 日

0 投票

t = 0:0.01:10;
vs = 3.*exp(-t /3).*sin(pi*t);
vl=vs;
vl(vs<=0)=0;
plot(t,vl)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Signal Generation, Analysis, and Preprocessing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by