MATLAB: How to draw 2D periodic triangular signal triangle w=1; % signal widthAmp=1; % signal amplitudett=-w:w;y1=Amp-Amp*abs(tt)/w;figure;plot(tt,y1) is this is code is right?? Best Answer Not yet. That is just one period, not a waveform with multiple periods. Use repmat() to make more of them. Related SolutionsMATLAB: Scaling for periodic signal using hann window Hi Lisa, it should be the same:t = 0:0.001:1-0.001;xn = cos(2*pi*100*t);w = hanning(length(xn));x = xn'.*w; sc = 1/sum(w);xdft = fft(xn);xdft = xdft(1:length(xn)/2+1);y = sc*xdft;plot(abs(y)); MATLAB: How to add an initial point to 5 curves in a plot tt = [t_for_initial_point, t];d0 = y_for_initial_point;plot(tt, [d0, dCa1dt]);plot(tt, [d0, dCa2dt]);plot(tt, [d0, dCa3dt]);plot(tt, [d0, dCa4dt]);plot(tt, [d0, dCa5dt]); Related QuestionControlling array data when calculatingSquare wave of 1,1,0 then 1,0,0Need solution with symbolicHow do plot 2 sine waves on the same plot with different line markers
Best Answer