• 大小: 2.27MB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-01-09
  • 语言: C/C++
  • 标签: C++  曲线拟合  

资源简介

一个基于C++的多项式曲线拟合源代码,运用最小二乘法,供大家参考。

资源截图

代码片段和文件信息

#include 
#include 
#include 
#include 

using namespace std;

//最小二乘拟合相关函数定义
//double sum(vector Vnum int n);
//double MutilSum(vector Vx vector Vy int n);
double RelatePow(vector Vx int n int ex);
double RelateMutiXY(vector Vx vector Vy int n int ex);
void EMatrix(vector Vx vector Vy int n int ex double coefficient[]);
void CalEquation(int exp double coefficient[]);
double F(double c[] int l int m);
double Em[6][4];



//主函数,这里将数据拟合成二次曲线
int main(int argc char* argv[])
{
/*int a;
vector arry1(a) arry2(a);*/

double arry1[5] = { 00.25050.75 };
double arry2[5] = { 11.2831.6492.2122.178 };
double coefficient[5] ;
memset(coefficient 0 sizeof(coefficient))

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     27648  2019-02-13 14:10  Functionfitting\.vs\Functionfitting\v14\.suo

     文件       3113  2019-02-13 14:10  Functionfitting\Functionfitting\functionfitting.cpp

     文件       7264  2018-12-04 14:28  Functionfitting\Functionfitting\Functionfitting.vcxproj

     文件        956  2018-12-04 14:28  Functionfitting\Functionfitting\Functionfitting.vcxproj.filters

     文件        195  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\Functionfitting.log

     文件     294170  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\functionfitting.obj

     文件        620  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\Functionfitting.tlog\CL.command.1.tlog

     文件      10048  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\Functionfitting.tlog\CL.read.1.tlog

     文件        472  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\Functionfitting.tlog\CL.write.1.tlog

     文件        183  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\Functionfitting.tlog\Functionfitting.lastbuildstate

     文件       1158  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\Functionfitting.tlog\link.command.1.tlog

     文件       2602  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\Functionfitting.tlog\link.read.1.tlog

     文件        436  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\Functionfitting.tlog\link.write.1.tlog

     文件     347136  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\vc140.idb

     文件     430080  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\vc140.pdb

     文件       1327  2018-12-04 14:26  Functionfitting\Functionfitting.sln

     文件     110592  2019-02-13 10:19  Functionfitting\x64\Debug\Functionfitting.exe

     文件    1813900  2019-02-13 10:19  Functionfitting\x64\Debug\Functionfitting.ilk

     文件    1675264  2019-02-13 10:19  Functionfitting\x64\Debug\Functionfitting.pdb

     目录          0  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug\Functionfitting.tlog

     目录          0  2018-12-04 14:26  Functionfitting\.vs\Functionfitting\v14

     目录          0  2019-02-13 10:19  Functionfitting\Functionfitting\x64\Debug

     目录          0  2018-12-04 14:26  Functionfitting\.vs\Functionfitting

     目录          0  2018-12-04 14:28  Functionfitting\Functionfitting\x64

     目录          0  2018-12-05 14:26  Functionfitting\x64\Debug

    ...D.H.         0  2018-12-04 14:26  Functionfitting\.vs

     目录          0  2019-02-13 14:10  Functionfitting\Functionfitting

     目录          0  2018-12-04 14:28  Functionfitting\x64

     目录          0  2019-02-13 14:10  Functionfitting

     文件    8593408  2019-02-13 14:10  Functionfitting\Functionfitting.VC.db

............此处省略3个文件信息

评论

共有 条评论