MATLAB Answers

sawtooth plot with specific x ,y limits

3 views (last 30 days)
Hi every one, How can I plot as saw tooth plot with exact x, y limits as attached image?
Thanks in advance

  0 Comments

Sign in to comment.

Accepted Answer

madhan ravi
madhan ravi on 3 Nov 2018
Edited: madhan ravi on 3 Nov 2018
T = 10*(1/50);
Fs = 1000;
dt = 1/Fs;
t = 0:dt:T-dt;
x = sawtooth(2*pi*50*t);
plot(t,x)
xlim([0 0.2])
ylim([-1 1])
grid on

  7 Comments

Show 4 older comments
Oday Shahadh
Oday Shahadh on 3 Nov 2018
close all T=6; Fs=10000; dt = 10/Fs; t = 0:dt:T-dt; x = sawtooth(2*pi*t); % <— REMOVE THE ‘-10’ HERE x = x*4; % <— ADD THIS LINE t=t*5; plot(t,x) grid on

Sign in to comment.

More Answers (1)

Community Treasure Hunt

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

Start Hunting!