| 查看: 616 | 回复: 2 | ||
[求助]
本人新手。望大神相助。。。
|
|
% the file to creat a function with parameters function y = poly3_fun(x,a,b,c) y = x^3+a*x^2+b*x+c; % find the minimum of the function f(x)=x^3+a*x^2+b*x+c function [x0,y] = funmin_para(a,b,c,x1,x2) options = optimset('Display','off'); [x0,y] = fminbnd(@(x)poly3_fun(x,a,b,c),x1,x2,options); % plot the function 编写上述的M文件。然后在命令窗口输入:[x,y]=funmin_para(-1000,10,0,600,800) 可是系统却提示:??? Undefined function or method 'funmin_para' for input arguments of type 'double‘。这是为何啊? |
» 猜你喜欢
271材料工程求调剂
已经有5人回复
281求调剂(0805)
已经有16人回复
304求调剂
已经有6人回复
材料工程专硕调剂
已经有6人回复
一志愿天大材料与化工(085600)总分338
已经有4人回复
085700资源与环境308求调剂
已经有3人回复
求材料调剂
已经有8人回复
294求调剂材料与化工专硕
已经有5人回复
一志愿华中科技大学,080502,354分求调剂
已经有4人回复
一志愿吉林大学材料学硕321求调剂
已经有6人回复
» 本主题相关价值贴推荐,对您同样有帮助:
ICEM边界层网格处理问题,跪求大神相助!
已经有5人回复
菜鸟 求指导啊
已经有7人回复
新手—高斯仿真红外光谱
已经有31人回复
一个关于薄膜堆放的问题(跪求大神相助!)
已经有7人回复
求大牛给一个hpmpi的原始安装包,2.0及以上的
已经有5人回复
有几个A,B类错误,新手刚学解晶体,不会弄撒,求助高手大神
已经有4人回复
求PCR实验流程,小弟是个新手求高手相助
已经有9人回复

【答案】应助回帖
★ ★ ★ ★ ★ ★ ★ ★ ★ ★
感谢参与,应助指数 +1
叶幕秋枫: 金币+10, ★★★★★最佳答案, 谢谢 2013-10-21 19:41:28
感谢参与,应助指数 +1
叶幕秋枫: 金币+10, ★★★★★最佳答案, 谢谢 2013-10-21 19:41:28
|
LZ可尝试将funmin_para.m文件改为 % find the minimum of the function f(x)=x^3+a*x^2+b*x+c function [x0,y] = funmin_para(a,b,c,x1,x2) options = optimset('Display','off'); [x0,y] = fminbnd(@(x)poly3_fun(x,a,b,c),x1,x2,options); % plot the function % the file to creat a function with parameters function y = poly3_fun(x,a,b,c) y = x^3+a*x^2+b*x+c; 也就是将里面两个函数换位,funmin_para是主函数。 |
2楼2013-10-20 22:10:48
3楼2018-12-10 17:27:24













回复此楼