随笔分类 -  数值分析

Cubic Spline三次样条曲线
摘要://C9.cpp//CreatNatuarlCubicSpline#include<iostream.h>constintN=6;voidNCS(doublex[],doublea[],doubleb[],doublec[],doubled[],intn){doubleh[N-1],alpha[N-1],l[N],z[N],u[N];inti;for(i=0;i<n-1;i++){h[i]=x[i+1]-x[i];}for(i=1;i<n-1;i++){alpha[i]=3*(a[i+1]-a[i])/h[i]-3*(a[i]-a[i-1])/h[i-1];}//Now 阅读全文

posted @ 2013-03-07 09:13 _安静 阅读(1054) 评论(0) 推荐(0) 编辑

导航

点击右上角即可分享
微信分享提示