periodic functions

2 visualizaciones (últimos 30 días)
li
li el 5 de Abr. de 2011
I would like to know how to make a 1 periodic function which is a this fuction times itself is also a periodic function a*a=b a is one periodic b is one periodic too I have a fumction right now is
function piecewise2=piecewphi(x)
z = mod(2*x,2)-1
piecewise2=abs(1-abs(z)).*(abs(z)<1);
end
and how can I modify it to fit the case? thanks
  3 comentarios
li
li el 5 de Abr. de 2011
I want a piecewise linear 1 periodic function
you may refer to this picture http://www.flickr.com/photos/58977081@N02/5579460185/
thanks
li
li el 5 de Abr. de 2011
the ak part

Iniciar sesión para comentar.

Respuestas (3)

Andrew Newell
Andrew Newell el 5 de Abr. de 2011
If I understand your question, you want a function like this:
function p=piecewise2d(x,y)
p = piecewphi(x).*piecwphi(y);

li
li el 5 de Abr. de 2011
yes but the point is I am also a bit confuse about what I should generate i.e. I donno what is the correct answer to draw that function
  2 comentarios
Walter Roberson
Walter Roberson el 5 de Abr. de 2011
sin(2*pi*mod(x,1)) is 1-periodic, and raising it to any arbitrary positive integer power N also gives a 1-periodic function.
I _suspect_ (but do not know) that for your purposes, that for any given x, at least one of your functions needs to be non-zero, as otherwise no information content would be associated with that x.
Andrew Newell
Andrew Newell el 5 de Abr. de 2011
This should be a comment. I'll add a comment to Walter's answer.

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 6 de Abr. de 2011
Apologies, in my earlier answer, I did not notice that you had altered your function to z = mod(2*x,2)-1 . What you have now should be 1 periodic, and should be piecewise linear.
However, I do not understand what your question is at this time.
If you want to multiply your piecewphi function by itself, go ahead, but notice that the result will not be piecewise linear: it would be piecewise quadratic instead.

Categorías

Más información sobre Interpolation 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!

Translated by