matlab fminsearch 求取最小值失败的情况
来源:互联网 发布:淘宝宝贝详情怎么做 编辑:程序博客网 时间:2024/05/18 01:10
d = 800;
P1 = [-d, -d];
P2 = [d, -d];
P3 = [d, d];
P_center = [-d, d];
TAG = [1000.836734693877590 + 6000, 9.224489795918398e+02 + 6000];
% compute the distance separately between the movable taget node and the three anchor node
d1 = pdist2(TAG, P1);
d2 = pdist2(TAG, P2);
d3 = pdist2(TAG, P3);
d_center = pdist2(TAG, P_center);
%d_err = x_rand(50, 4)
d_err = [-28.4239 -42.1261 43.3060 10.2872];
d1_new = d1 + d_err(1) + 20;
d2_new = d2 + d_err(2) + 20;
d3_new = d3 + d_err(3) + 20;
d_center_new = d_center + d_err(3) + 20;
% fminsearch method
myfunc_ideal = @(x)(sqrt((P1(1) - x(1))^2 + (P1(2) - x(2))^2) - d1)^2 + (sqrt((P2(1) - x(1))^2 + (P2(2) - x(2))^2) - d2)^2 + ......
(sqrt((P3(1) - x(1))^2 + (P3(2) - x(2))^2) - d3)^2 + (sqrt((P_center(1) - x(1))^2 + (P_center(2) - x(2))^2) - d_center)^2;
[out_p_ideal, fval, exitflag, output] = fminsearch(myfunc_ideal,[1,1]); %[1,1,]是迭代初值
myfunc_real = @(x)(sqrt((P1(1) - x(1))^2 + (P1(2) - x(2))^2) - d1_new)^2 + (sqrt((P2(1) - x(1))^2 + (P2(2) - x(2))^2) - d2_new)^2 + ......
(sqrt((P3(1) - x(1))^2 + (P3(2) - x(2))^2) - d3_new)^2 + (sqrt((P_center(1) - x(1))^2 + (P_center(2) - x(2))^2) - d_center)^2;
[out_p_real, fval, exitflag, output] = fminsearch(myfunc_real,[1,1]); %[1,1,]是迭代初值
执行的时候报错:
正在退出: 超过了函数计算的最大数目
- 请增大 MaxFunEvals 选项。
当前函数值: 816883.294114
TAG =
1.0e+03 *
7.0008 6.9224
out_p_ideal =
1.0e+03 *
7.0008 6.9224
out_p_real =
1.0e+03 *
9.6811 1.8230
- matlab fminsearch 求取最小值失败的情况
- MATLAB-fminsearch函数的使用
- MATLAB-fminsearch函数的使用
- matlab fminbnd, fminsearch
- Matlab 用于求解无约束非线性规划的函数有:fminsearch和fminunc,用法介绍如下。
- Matlab优化问题03—fminsearch
- matlab fminsearch函数 …
- 异或操作求取最小值
- matlab求取积分
- matlab-基础 求取字符串中各个字符的ASCII码
- 给定N个数,求取其最大最小值,要求尽可能的快
- matlab 雅可比矩阵求取
- matlab 求一个矩阵的最小值最大值
- matlab内存不足的情况解决方案
- 水仙花数的求取
- 素数的求取
- 音频降噪后信噪比求取(MATLAB)
- Matlab找矩阵中最大最小值的位置
- JQuery在光标位置插入内容
- 逆波兰表达式求值
- Ant与Maven在liunx上的安装
- 牛客网---2016---蘑菇街回文串
- java 日期计算
- matlab fminsearch 求取最小值失败的情况
- mongo查询过滤条件java实例($and,$or,$eq,$ne)
- linux Nginx配置篇:rewrite模块参数详解
- AS代码混淆
- effective c++ item04:确定对象被使用之前以先被初始化
- 【greenDAO3】 项目搭建与增删改查操作
- c#委托事件与回调
- Caffe2新增RNN支持
- JAVA——interface总结