Difference between a<t<b and t>a && t<b
이전 댓글 표시
Hi I am trying to verify existence of even and odd harmonics in e^(-t) periodic with period pi. For that I try to verify f(t)=f(t+pi). and for f(t+pi) i try to add shift using if-else condition according to this link answer should have even harmonics, http://www.intmath.com/fourier-series/5-harmonic-analysis.php I am trying to solve Example 2(b) in Matlab.
Now if i use the condition 0<=t(i)<pi it shows me even harmonic but if i use 0>=t(i) && t(i)<pi it gives neither even nor odd.
So, my question is why isn't Matlab showing same result for both formats. and which format is correct.
채택된 답변
추가 답변 (1개)
Ahmet Cecen
2015년 4월 28일
might be because you are supposed to write:
*t(i)>=0 && t(i)<pi*
NOT:
*0>=t(i) && t(i)<pi*
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!