T = 20;
N = 10;
f = 1/T;
x = linspace(0, T*N, 10000);
y = sawtooth(2*pi*f*x, 0); & el tercer parametro varia entre 0 y 1
plot(x, y, 'LineWidth', 2);
ylim([-2 2])
grid on
%% 7) Tren de Pulsos Triangulares (pulstran)
% Periodo: 10, Duracion: 5, Numero de pulsos: 10;
clc
clear
close all
T = 10;
D = 5;
N = 10;
x = linspace(0, T*N, 10000);
d = [0:T:T*N];
y = pulstran(x, d, 'tripuls', D, 0); % el ultimo parametro varia de -1 a 1
plot(x, y, 'LineWidth', 2);
ylim([-1 2])
grid on
% Funcion Escalon
clc
clear
close all
t = linspace(-10, 10, 1000);
u1t = heaviside(t); % cambiarlo luego t t-3
plot(t, u1t, 'Linewidth', 2); grid on
title('\bfFUNCION ESCALON')
ylim([-5 5])
% Funcion RAMPA
clc
clear
close all
t = linspace(-10, 10, 1000);
u2t = t.*heaviside(t); % cambiar luego toda t t+4, luego t+4 -t+4
% luego cambiar a t 3*t, primero en las pendiente
plot(t, u2t, 'Linewidth', 2); grid on
title('\bfFUNCION RAMPA')
ylim([-10 10])
% Funcion Parabola
clc
clear
close all
t = linspace(-10, 10, 1000);
u2t = ((t).^2)/2 .*heaviside(t); % cambiarlo luego t t+4
plot(t, u3t, 'k', 'Linewidth', 2); grid on
title('\bfFUNCION PARABOLA')
ylim([-50 50])
close all
clear
clc
t = linspace(0, 4, 100);
p1 = t.*heavislde(t);|
p2 = -(t-1).*heaviside(t-1);
p3 = 2*((t-3).^2)/2.*heaviside(t-3);
ft = p1 + p2 + p3;
plot(t,ft,'Linewidth', 2);
grid on
%%
close all
clear
clc
t = linspace(0, 2*pi, 100);
pi = 10*sin(t).*heaviside(t);
p2 = -10*sin(t).*heaviside(t-pi);
ft = p1 + p2:
plot(t, ft, 'Linewidth', 2);
grid on
ylim([-5 15])
%%
close all
clear
clc
t = linspace(0, 60, 10000);
p1 = 10*sin(t).*heaviside(t);
p2 = -10*sin(t).*heaviside(t-pi);
ft = p1 + p2:
plot(t, ft, 'Linewidth', 2);
grid on
ylim([-5 15])
http://www.youtube.com/watch?v=4W7-bkO8ehM
%%
close all
clear
clc
t = linspace(0, 60, 10000);
p1 = 200*heaviside(t);
p2 = -500*heaviside(t-20);
p3 = 10*heaviside(t-20).*(t-20);
p4 = -10*heaviside(t-20).*(t-40);
p5 = 100*heaviside(t-60);
ft = p1 + p2 + p3 + p4 + p5;
plot(t, ft, 'Linewidth', 2);
grid on
ylim([-400 300])