MATLAB: How to create half cycle sine pulse train hsc 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 Best Answer How to create half cycle sine pulse trainIs 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); Related SolutionsMATLAB: To reproduce a wave packet Hope this helpsW= linspace(0, 10.0, 500);plot(W, sin(W*2*pi) - sin(W*1.1*2*pi)) MATLAB: How to create a fuction p(t) This runs. I will let you determine if it produces the result you want:w=2*pi*1.0E+5;p = @(t) cos(t) .* ((-pi/2 <= t) & (t <= pi/2));s = @(t) p(t).*cos(w*t)-p(t-2*pi).*cos(w*t)+cos(t-(3*pi/2)).*sin(w*2*t)-p(t-(5*pi/2)).*sin(w*t);t = linspace(-pi, 2*pi);figure(1)plot(t, s(t))grid Related QuestionWhat are the methods that build the matrix in Simulink 2017Can be 2 different figures can be plotted and seenOutput argument is not assigned on some execution paths.Controlling array data when calculating
Best Answer