能运算的函数: sin,cos,tg,ctg,e^,pow(x,y),cosh,sinh,tgh,log10,ln,sqrt,arcsin,arccos,...
能运算的函数: sin,cos,tg,ctg,e^,pow(x,y),cosh,sinh,tgh,log10,ln,sqrt,arcsin,arccos,
运算方式: +,-,*,/,绝对值(“[ ]”),^,!,
输入规则: 用键盘或按钮都可,输入完按回车运算,(光标要在最后)
sin(21-32)/(12-43)
4(323-4343) 4*(323-4343) e^2-sin3-3^4,(不要输入pow(3,4)) //有无*都可
2*3^4是(2*3)^4 而不是2*(3^4) 也就是要用x^y就要一定要(x^y)加上一个括号
[3-4]是求3-4的绝对值不是中括号 -performance computing functions : sin, cos, tg, rays, e ^, pow (x, y), cosh, sinh, tgh, log10, ln, sqrt, Simulation, arccos computational methods : absolute ,-,*,/, ( "[]"),^,!, importation rules : a keyboard or buttons which can be imported by the transport operator End (cursor to the final) sin (21-32)/(12-43) 4 (323-4343) 4* ( 323-4343), e ^ 2- KF-3 ^ 4 (do not enter pow (3,4))//* there can be 2* 3 ^ 4 is (2* 3) ^ 4 rather than 2* (3 ^ 4) was needed x ^ y must have (x ^ y) with a brackets [3-4] is the pursuit of 3-4 is not the absolute value of the brackets
- 2022-01-26 03:43:37下载
- 积分:1
运用粒子群计算函数的极值
应用背景
求最大值与求最小值两者转换时的修改处:
BaseStepPso:代码83行和91行
InitSwarm: 代码44行
PsoProcess: 代码
69行
关键技术
调用格式:
Scope=[ ];
[xm,on,off,fv]=PsoProcess(N,D,Scope,@InitSwarm,@BaseStepPso,@fitness,IsStep,0,M,IsPlot);
Xm:目标函数取最大值时的自变量
Fv:目标函数的最大值
on:在线性能的数据
off:离线性能的数据
N:粒子数目(一般取20-40。对于大部分的问题10个粒子已经足够可以取得好的结果,
不过对于比较难的问题或者特定类别的问
- 2022-12-27 12:25:05下载
- 积分:1