Re: [問題] 請問怎麼畫圖已回收

看板MATLAB作者 (蛋包飯主廚)時間17年前 (2008/12/02 04:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《yfren2 (艾小客)》之銘言: : 請問Σ2/nπ(1-(-1)^n)sin nx ^^^^^^^^^^^^^^^^^^ 老實講...你函數打成這樣很容易讓人看不懂 不過我想應該是方波的fouier Series : n=1 到無窮大請問要怎麼畫 你X軸是函數裡頭的x嗎? : 沒學過MALAB的新手... n = 1:1000; x=0.2:0.2:20; for j=1:100 a(j)=sum(2./(n.*pi).*(1-(-1).^n).*sin(n.*x(j))); end plot(x,a) -- ──———————————───┐ Always follow your dreams , don't let anyone tell you that ▃▃▃ you can't be something ───────── By A-Rod -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.112.41.127
文章代碼(AID): #19D4dd-I (MATLAB)
文章代碼(AID): #19D4dd-I (MATLAB)