淇″彿涓庣郴缁熷疄楠屾姤鍛?- 鐧惧害鏂囧簱 联系客服

发布时间 : 星期一 文章淇″彿涓庣郴缁熷疄楠屾姤鍛?- 鐧惧害鏂囧簱更新完毕开始阅读55db40a4f80f76c66137ee06eff9aef8941e4837

为三角级数展开系数:第 1 元素是直流项,其后元素依次 是 1,2,3...次谐波 cos 项展开系数 d=B_sym;disp(d) %输出 d 为三角级数展开系数: 第 2,3,4,...元素依次是 1,2,3...次谐 波 sin 项展开系数 t=-8*a:0.01:T-a; f1=c(1)+c(2).*cos(2*pi*1*t/5)+0.*sin(2*pi*1*t/5); ; % 基波 f2=c(3).*cos(2*pi*2*t/5)+0.*sin(2*pi*2*t/5); ; % 2 次谐波 f3=c(4).*cos(2*pi*3*t/5)+0.*sin(2*pi*3*t/5); % 3 次谐波 f4=c(5).*cos(2*pi*4*t/5)+0.*sin(2*pi*4*t/5); ; % 4 次谐波 f5=c(5).*cos(2*pi*5*t/5)+0.*sin(2*pi*5*t/5); % 6 次谐波 f6=c(7).*cos(2*pi*6*t/5)+0.*sin(2*pi*6*t/5); % 6 次谐波 f7=c(7).*cos(2*pi*7*t/5)+0.*sin(2*pi*7*t/5); % 7 次谐波 f8=c(8).*cos(2*pi*8*t/5)+0.*sin(2*pi*8*t/5); % 8 次谐波 f9=c(9).*cos(2*pi*9*t/5)+0.*sin(2*pi*9*t/5); % 9 次谐波 f10=c(10).*cos(2*pi*10*t/5)+0.*sin(2*pi*10*t/5); % 10 次谐波 f11=f1+f2+f3; % 基波+2 次谐波+3次谐波 f22=f11+f4+f5+f6; % 基波+2 次谐波+3次谐波+4次谐波+5次谐波+6次谐波 f33=f22+f7+f8+f9+f10; % 基波+2 次谐波+3次谐波+4次谐波+5次谐波+6次谐波 +7次谐波+8次谐波+8次谐波+10次谐波 subplot(2,2,1) plot(t,f1) hold on y=time_fun_e(t) %调用连续时间函数-周期矩形脉冲 plot(t,y,'r:') title('基波+直流') axis([-4,4.5,-0.5,1.5]) subplot(2,2,2) plot(t,f11) hold on y=time_fun_e(t) plot(t,y,'r:') title('基波+2 次谐波+3次谐波') axis([-4,4.5,-0.5,1.5]) subplot(2,2,3) plot(t,f22), hold on y=time_fun_e(t)