How i can plot anti periodic sine wave in matlab ?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
error 401
Messages
19
Reaction score
0
i don't know how i can use MATLAB to plot anti periodic fun ..

the origin site give this code for triangular fun:

fs = 10000;
t = -1:1/fs:1;
x1 = tripuls(t,20e-3);
plot(t,x1), xlabel('Time (sec)');ylabel('Amplitude'); title('Triangular Aperiodic Pulse')


but when i use this for sine wave . i have an error (? Error using ==> sin
Too many input arguments.)

so how i can solve this problem ?

thanx in advance
 
Physics news on Phys.org
error 401 said:
i don't know how i can use MATLAB to plot anti periodic fun ..

the origin site give this code for triangular fun:

fs = 10000;
t = -1:1/fs:1;
x1 = tripuls(t,20e-3);
plot(t,x1), xlabel('Time (sec)');ylabel('Amplitude'); title('Triangular Aperiodic Pulse')


but when i use this for sine wave . i have an error (? Error using ==> sin
Too many input arguments.)

so how i can solve this problem ?

thanx in advance

Can you post the code that you used for the sine wave pulse?
 
the same code but i change tripulse to sin >>

fs = 10000;
t = -1:1/fs:1;

x1 = sin(t,20e-3);
plot(t,x1), xlabel('Time (sec)');ylabel('Amplitude'); title('sin Aperiodic Pulse')