周期矩形波周期锯齿波周期三角波C语言程序Word格式文档下载.docx

上传人:b****0 文档编号:13486232 上传时间:2022-10-11 格式:DOCX 页数:8 大小:14.80KB
下载 相关 举报
周期矩形波周期锯齿波周期三角波C语言程序Word格式文档下载.docx_第1页
第1页 / 共8页
周期矩形波周期锯齿波周期三角波C语言程序Word格式文档下载.docx_第2页
第2页 / 共8页
周期矩形波周期锯齿波周期三角波C语言程序Word格式文档下载.docx_第3页
第3页 / 共8页
周期矩形波周期锯齿波周期三角波C语言程序Word格式文档下载.docx_第4页
第4页 / 共8页
周期矩形波周期锯齿波周期三角波C语言程序Word格式文档下载.docx_第5页
第5页 / 共8页
点击查看更多>>
下载资源
资源描述

周期矩形波周期锯齿波周期三角波C语言程序Word格式文档下载.docx

《周期矩形波周期锯齿波周期三角波C语言程序Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《周期矩形波周期锯齿波周期三角波C语言程序Word格式文档下载.docx(8页珍藏版)》请在冰豆网上搜索。

周期矩形波周期锯齿波周期三角波C语言程序Word格式文档下载.docx

doublefunction(doublet);

doublesum();

doubledraw();

doublefunction(doublet)

{

doublex,s,w,m;

intn,k;

w=2*pi/T1;

s=0;

for(n=1;

n<

=200;

n++)

{

k=pow(-1,n-1);

x=cos((2*n-1)*w*t)/(2*n-1)*k;

s=x+s;

}

m=s*2*E/pi;

return(m);

voidcheck_initialize()

intdriver,mode;

detectgraph(&

driver,&

mode);

initgraph(&

mode,"

..\\bgi"

);

}

doublesum()

doublec,t,m,x[301],s[300];

inti,g,y,j;

x[0]=0;

for(i=1;

i<

i++)

{setcolor(5);

x[i]=x[i-1]+;

c=x[i];

s[i]=function(c);

line(100*x[i-1]+20,-100*s[i-1]+300,100*x[i]+20,-100*s[i]+300);

return0;

doubledraw()

intl,b[61],c[60];

b[0]=200;

setcolor(9);

line(10,300,600,300);

line(20,410,20,30);

setcolor(6);

line(15,35,20,30);

line(25,35,20,30);

line(595,295,600,300);

line(595,305,600,300);

for(l=1;

l<

=25;

l++)

b[l]=b[l-1]+4;

c[l]=220;

putpixel(c[l],b[l],5);

outtextxy(10,25,"

Y"

outtextxy(605,305,"

X"

outtextxy(220,300,"

2"

outtextxy(10,200,"

1"

outtextxy(10,300,"

0"

voidmain()

check_initialize();

setbkcolor(15);

sum();

draw();

getch();

周期三角波C语言代码

intn;

x=cos((2*n-1)*w*t)/((2*n-1)*(2*n-1));

m=s*4*E/(pi*pi)+E/2;

c=x[i];

line(100*x[i-1]+20,-100*s[i-1]+400,100*x[i]+20,-100*s[i]+400);

line(10,400,600,400);

line(595,395,600,400);

line(595,405,600,400);

=50;

outtextxy(605,405,"

outtextxy(220,400,"

outtextxy(10,400,"

周期锯齿波的C语言代码

doublex,s,w,k,m;

x=sin(n*w*t)/n*k;

m=s*E/pi;

b[0]=20;

line(20,310,20,30);

c[l]=205;

putpixel(b[l],c[l],5);

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 农林牧渔 > 水产渔业

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1