function f = funcion_triangular_periodica (t, T) nmuestras = length(t); f = zeros(nmuestras,1); for k=1:nmuestras n = floor(1 + (1/T)*(t(k)-T)); t2 = t(k)-n*T; if t2 >=0 && t2 <= (T/2) f(k) = (2/T)*t2; else f(k) = 1- (2/T)*(t2-T/2); endif end endfunction