MATLAB: Sampling sawtooth sequence at high rate MATLABsampling rate why matlab give error fs = 10000 n=0:10000 t = 0:1/fs:1.5; x1 = sawtooth(2*pi*50*t); subplot(2,1,1) stem(n,x1) axis([0 0.1 -1.2 1.2]) Best Answer fs = 10000 t = 0:1/fs:1.5; x1 = sawtooth(2*pi*50.*t); subplot(2,1,1) stem(x1) xlim([1 200]) Related SolutionsMATLAB: Sawtooth plot with specific x ,y limits 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 MATLAB: How to plot sawtooth wave sawtooth function You are very close. Try this: f = @(x) rem(x+3,2)-1figurefplot(f, [-3,3])It offsets the ‘x’ value, subtracts 1 so the limits are appropriate, then does the plot. It may not be universally applicable, for all ‘x’. It works here for this particular problem. Related QuestionError:Undefined function or variable ‘sawtooth’.Multiply a sawtooth wave form and sin wave togetherPhase Shift Sawtooth Wave
Best Answer