ImageVerifierCode 换一换
格式:DOCX , 页数:10 ,大小:84.05KB ,
资源ID:13499951      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/13499951.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(等距点插值公式文档格式.docx)为本站会员(b****2)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

等距点插值公式文档格式.docx

1、二、算法框图三、算法程序class Interpolationpublic: Interpolation(int num, double x1, double x2, double func); double ComputeForwardValue(double x); / compute forward interpolation value Interpolation();private: void GetForwardTable(); / get the forward differential table int m_num; / the number of interpolation

2、 points double m_x1, m_x2; / the first point m_x1 and last point m_x2 double m_step; / the interpolation step double* m_func; / the function value of interpolation points double* m_ftable; / the forward differential table;#include limitsusing namespace std;#define NUM 11/上?面?输入需要a多少个?样本#define MIN 0

3、区?间?的最小?值#define MAX 10大int main() /下?y的 double funcNUM= 0,1,4,9,16,25,36,49,64,81,100 ; /上 double x1=MIN, x2=MAX, x; int num=NUM; char flag=Y; Interpolation test(num, x1, x2, func); while(flag=) coutx; if (!cin) / checking failure state cin.clear(); / clear failure tag cin.ignore(numeric_limits:max

4、(), n); / clear input buffer continue; if(xx2) -Invalid input:x-endl;Only the number between x1 and x2 is valid. else Forward interpolation value:test.ComputeForwardValue(x+0.001) coutendlflag; return 0;Interpolation:Interpolation(int num, double x1, double x2, double func) m_num = num; m_x1 = x1; m

5、_x2 = x2; m_step = (m_x2-m_x1)/(num-1); m_func = new doublem_num; m_ftable = new doublem_num; for (int i=0; i=i; -j) m_ftablej = m_ftablej-m_ftablej-1;double Interpolation:ComputeForwardValue(double x) double* coef; /coefficient talbe double result, t; int i; coef = new doublem_num; t = (x-m_x1)/m_s

6、tep; for (i=1, coef0=1; +i) /compute the coefficient table coefi = coefi-1*(t-i+1)/i; for (i=0, result=0; result += m_ftablei*coefi; delete coef; return result;四、算法实现例1.当时求在范围内任意的值。解:(1)在程序中输入11个样本: 0,1,4,9,16,25,36,49,64,81,100、且输入MIN:0,MAX:10,样本容量:11。(2)在运行程序中输入范围内的任意的值,如:1.2,1.4等。(3)程序提示答案和提示是否继续,是则输入大写Y,否则输入大写N。例2.当给出15个 : 1.38, 1.48, 1.58, 1.69, 1.81, 1.94, 2.10, 2.28, 2.50, 2.76, 3.06, 3.41, 3.83, 4.33, 4.93,且给出范围:求出任意(1)给出15个题目上显示的值:4000,MAX:11000,样本容量:15。1001,5200等。

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

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