Matlab中未定义的函数或变量"optimoptions" [英] Undefined function or variable 'optimoptions' in Matlab

查看:2485
本文介绍了Matlab中未定义的函数或变量"optimoptions"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在文档中使用它:

options = optimoptions('fminunc','GradObj','on','Hessian','on');

出于某种原因,我收到此错误:

and for some reason I get this error:

Undefined function 'optimoptions' for input arguments of type 'char'.

我不确定是什么问题.当我在Matlab中键入optimoptions时 它说:

I am not sure what is the problem. Also when I type optimoptions in Matlab it says:

Undefined function or variable 'optimoptions'.

谢谢

推荐答案

函数optimoptionsMATLAB R2013a中新引入的.您可能正在使用MATLAB的旧版本.如果是这样,请使用optimset而不是optimoptions.

The function optimoptions was newly introduced in MATLAB R2013a. It might be the case that you are using an older version of MATLAB. If so use optimset instead of optimoptions.

这篇关于Matlab中未定义的函数或变量"optimoptions"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆