欢迎来到天天文库
浏览记录
ID:59224708
大小:195.50 KB
页数:4页
时间:2020-09-09
《分段三次hermite插值.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、C语言课程设计报告课程名称:程序设计语言组员:学号:魏文豪汤恒彭建平指导教师:李华刚2015年12月13日流程图代码!#include#include#definem4#definen5voidmain(){inti,k;floatx[n+1],y[n+1],yy[n+1],h,z[m];printf("请按行输入一系列的x值:");for(k=0;k2、;k++)scanf("%f",&y[k]);printf("请输入一系列的y'的值:");for(k=0;k=x[k]&&z[i]<=x[k+1]){h=pow((z[i]-x[k+1])/(x[k]-x3、[k+1]),2.0)*(1+2*(z[i]-x[k])/(x[k+1]-x[k]))*y[k]+pow((z[i]-x[k])/(x[k+1]-x[k]),2.0)*(1+2*(z[i]-x[k+1])/(x[k]-x[k+1]))*y[k+1]+pow((z[i]-x[k+1])/(x[k]-x[k+1]),2.0)*(z[i]-x[k])*yy[k]+pow((z[i]-x[k])/(x[k+1]-x[k]),2.0)*(z[i]-x[k+1])*yy[k+1];printf("h(%f)=%f",z[i]4、,h);}}运行图
2、;k++)scanf("%f",&y[k]);printf("请输入一系列的y'的值:");for(k=0;k=x[k]&&z[i]<=x[k+1]){h=pow((z[i]-x[k+1])/(x[k]-x
3、[k+1]),2.0)*(1+2*(z[i]-x[k])/(x[k+1]-x[k]))*y[k]+pow((z[i]-x[k])/(x[k+1]-x[k]),2.0)*(1+2*(z[i]-x[k+1])/(x[k]-x[k+1]))*y[k+1]+pow((z[i]-x[k+1])/(x[k]-x[k+1]),2.0)*(z[i]-x[k])*yy[k]+pow((z[i]-x[k])/(x[k+1]-x[k]),2.0)*(z[i]-x[k+1])*yy[k+1];printf("h(%f)=%f",z[i]
4、,h);}}运行图
此文档下载收益归作者所有