just plotting a 1 periodic function
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I would like to plot a 1 periodic function and it could be piecewise linear. I have a function like below,it is a triangular function, I would like to extend the triangle with a period 1,how can I do it? thanks
function piecewise=piecew(x);
piecewise=abs(1-abs(x)).*(abs(x)<1);
end
0 comentarios
Respuesta aceptada
Andrew Newell
el 31 de Mzo. de 2011
function piecewise=piecew(x)
z = mod(x,2)-1;
piecewise=abs(1-abs(z)).*(abs(z)<1);
end
Más respuestas (0)
Ver también
Categorías
Más información sobre Elementary Math en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!