smooth函数
经常在数学相关的文献中看到 smooth function 这个名词,因此决定查查这个光滑函数到底是什么。
- 光滑函数就是无穷可导的函数。
优化过程中,如果目标函数是光滑函数,那么有一些最优化方法可以保证优化时得到全局最优解。
官网地址:https://ww2.mathworks.cn/help/curvefit/smooth.html
详细介绍:https://blog.csdn.net/datase/article/details/77036571
https://blog.csdn.net/pluto21/article/details/80883384
https://blog.csdn.net/qq_38991255/article/details/81332382
mod函数
官网地址:https://ww2.mathworks.cn/help/matlab/ref/mod.html
Matlab取整函数有: fix, floor, ceil, round.具体应用方法如下:
- fix:朝零方向取整,如
fix(-1.3)=-1;
fix(1.3)=1;
- floor:顾名思义,就是地板,所以是取比它小的整数,即朝负无穷方向取整,如
floor(-1.3)=-2;
floor(1.3)=1;
floor(-1.8)=-2;
floor(1.8)=1
- ceil,与floor相反,它的意思是天花板,也就是取比它大的最小整数,即朝正无穷方向取整,如
ceil(-1.3)=-1;
ceil(1.3)=2;
ceil(-1.8)=-1;
ceil(1.8)=2;
- round:四舍五入到最近的整数,如
round(-1.3)=-1;
round(-1.52)=-2;
round(1.3)=1;
round(1.52)=2