优化设计鲍威尔算法MicrosoftWord文档.docxVIP

  • 10
  • 0
  • 约9.9千字
  • 约 10页
  • 2023-08-24 发布于四川
  • 举报
第一个程序1: #includestdio.h #includemath.h #define TOL 1.0e-3 #define m 10 #define RUN #define n 2 float golden(float a[], float b[], float c[], float tol,float xmin[]); void mnbrak(float a[], float b[], float c[],float d[], float *fa, float *fb, float *fc); float func(float x[]) { float result; result=60-10*x[0]-4*x[1]+x[0]*x[0]+x[1]*x[1]-x[0]*x[1]; //result=10*(float)pow((x[0]+x[1]-5),2)+(float)pow((x[0]-x[1]),2); return result; } float main(void) { int i,k,j,v=0,dmax=0,flag=0; float e,l,a[m],a1[m],a2[m],a3[m],b[m],c[m],d[m],d1[m][m],fa,fb,fc,xmin[m],xmin2[m],gold,amin,ac=0,x[m]; printf(

文档评论(0)

1亿VIP精品文档

相关文档