여태까지는 퓨리에 급수를 An, Bn을 전개해서 하나하나 대입해서 작성하다가 <div>f=cosx를 퓨리에급수로 만드려니 전개를 못 하겠더라구요 ..</div> <div><br></div> <div>그래서 인터넷에 검색을 해본 결과, <a target="_blank" href="https://www3.nd.edu/~nancy/Math30650/Matlab/Demos/fourier_series/fourier_series.html" target="_blank">https://www3.nd.edu/~nancy/Math30650/Matlab/Demos/fourier_series/fourier_series.html</a></div> <div>저 링크에 있는 식을 적용하니 예쁘게 나오더라구요 +_+</div> <div><br></div> <div>그래서 전개는 못 했지만, cosx의 퓨리에 급수를 아래와 같이 전개하였습니다.</div> <div><br></div> <div><div style="text-align:left;"><img src="http://thimg.todayhumor.co.kr/upfile/201510/1443845510RVfgQPvOaCPHn2rpn3lAkPCtpW.png" width="800" height="608" alt="cosx,pi2.png" class="chimg_photo" style="border:none;"></div><br></div> <div><br></div> <div>그리고 이번에는 f=cos(2*x)에 대해서도 똑같이 적용하려고 했는데 </div> <div><br></div> <div><div style="text-align:left;"><img src="http://thimg.todayhumor.co.kr/upfile/201510/14438455942uzqs7YpYa1ATpYe8.png" width="800" height="635" alt="cos2x,pi2.png" class="chimg_photo" style="border:none;"></div><br></div> <div>위의 사진처럼 모두 동일한 모습을 보여주더라구요; 링크에 있는 수식을 그대로 옮겨 적어 사용해서 응용을 전혀 못 하겠네요 ㅠㅠ</div> <div>cos(2x)의 그래프를 그릴때는 아래의 command를 사용하였습니다;</div> <div><br></div> <div><br></div> <div><div>syms x k L n</div> <div>evalin(symengine,'assume(k,Type::Integer)');</div> <div>a = @(f,x,k,L) int(f*cos(k*pi*x/L)/L,x,-L,L);</div> <div>b = @(f,x,k,L) int(f*sin(k*pi*x/L)/L,x,-L,L);</div> <div>fs = @(f,x,n,L) a(f,x,0,L)/2 + ...</div> <div> symsum(a(f,x,k,L)*cos(k*pi*x/L) + b(f,x,k,L)*sin(k*pi*x/L),k,1,n);</div></div> <div><br></div> <div><div><font size="4">f=cos(2*x)</font></div></div> <div><br></div> <div><div>ezplot(f,-2,2)</div> <div>hold on</div> <div>for ii=1:10</div> <div>ezplot(fs(f,x,ii,[pi]/2),-2,2)</div> <div>end</div> <div>ezplot(fs(f,x,10,[pi]/2),-2,2)</div> <div>ezplot(fs(f,x,20,[pi]/2),-2,2)</div> <div>ezplot(fs(f,x,30,[pi]/2),-2,2)</div> <div>ezplot(f,-2,2)</div> <div>title('Fourier Series')</div></div> <div><br></div> <div><br></div> <div>cosx의 그래프를 그릴때 f=cos(x)를 입력했을때는 정상적으로 나왔는데, 함수 자리에서 f=cos(2*x)로 바꾸기만 하는게 아닌것 같습니다. ㅠㅠ</div> <div><br></div> <div>어떻게 해야 정상적으로 출력될까요..?</div>