periodic functions
이전 댓글 표시
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
Andrew Newell
2011년 4월 5일
I don't understand your question. The function piecewphi is periodic and you want what?
li
2011년 4월 5일
li
2011년 4월 5일
답변 (3개)
Andrew Newell
2011년 4월 5일
If I understand your question, you want a function like this:
function p=piecewise2d(x,y)
p = piecewphi(x).*piecwphi(y);
li
2011년 4월 5일
0 개 추천
댓글 수: 2
Walter Roberson
2011년 4월 5일
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
2011년 4월 5일
This should be a comment. I'll add a comment to Walter's answer.
Walter Roberson
2011년 4월 6일
0 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!