How to create half cycle sine pulse train

28 views (last 30 days)
clc;
clear all ;
close all;
%wt = 0:0.2:pi;
tp=2.2676*10^-3;
Ts=22.67*10^-6;
n=1:Ts:101;
fp=(1/tp);
w=2*pi*fp;
%p=sin(wt);
p=sin(w*n*Ts);
plot(n,p);
i tried this

Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 22 Oct 2019
Edited: KALYAN ACHARJYA on 22 Oct 2019
How to create half cycle sine pulse train
Is this?
clc;
clear all;
close all;
%wt = 0:0.2:pi;
tp=2.2676*10^-3;
Ts=22.67*10^-6;
n=1:Ts:101;
fp=(1/tp);
w=2*pi*fp;
%p=sin(wt);
p=sin(w*n*Ts);
p(find(p<0))=0;
plot(n,p);
567.png

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!