⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vtb3_3

📁 vtoolbox3.5是振动数值模拟工具箱
💻
字号:
function vtb3_3(N)%VTB3_3  Fourier Series approximation to a triangle wave.% VTB3_3(N) displays the N term Fourier approximation to a % triangular input.  The approximation is plotted versus time % normalized by the period of the wave.  The Fourier series is % the solid line and the actual wave is the dotted line.%Creates triangular wavetau1=0:.01:.5;Ftr1=(4*tau1-1);tau2=.51:.01:1;Ftr2=3-4*tau2;%Creates Fourier approximationtau=[tau1 tau2];F=zeros(1,length(tau));for i=1:N			k=2*i-1;   Ftmp=(1/k^2)*cos(k*2*pi*tau);   F=F+Ftmp;endF=-(8/pi^2)*F;plot(tau1,Ftr1,'--',tau2,Ftr2,'--',tau,F,'-')title([int2str(N),' term Fourier series approximation to a triangular input'])ylabel('F(t)');xlabel('time / period')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -