Error In Fminsearch At 175
Support Support Newsreader MathWorks Search MathWorks.com MathWorks Newsreader Support MATLAB Newsgroup MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Post A New Message Advanced Search Help MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Post A New Message Advanced Search Help Trial software using fminsearch Subject: using fminsearch From: Chris Date: 13 Oct, 2004 03:53:17 Message: 1 of 2 Reply to this message Add author to My Watch List View original format Flag as spam Hallo, please take a look at this function, used to create a lognormal distribution. ----- function res=PLN(a,d,s) r=(-(log(2*a)-log(d)).^2)/(2*s*s) f1=(1./(2*a*(s*sqrt(2*pi)))) res=f1.*f2 ----- "d" and "s" are defined by input: v=[ 0.3 10] f.e. d=v(1) s=v(s) Until here that works pretty fine. I would like to use fminsearch to get the local minimizer "u": u=fminsearch(@PLN,v) Then an error is displayed: "Subscripted assignment dimension mismatch" "Error in ==> fminsearch at 175 fv(:,1)= funfcn(x,varargin{:});" What does it mean, and how can I solve the problem? Thanx a lot for any help! Subject: using fminsearch From: spellucci@fb04373.ma... Date: 13 Oct, 2004 12:35:13 Message: 2 of 2 Reply to this message Add author to My Watch List View original format Flag as spam In article
res=f1.*f2 ----- "d" and "s" are defined by input: v=[ 0.3 10] f.e. d=v(1) s=v(s) Until here that works pretty fine. I would like to use fminsearch to get the local minimizer "u": u=fminsearch(@PLN,v) Then an http://www.yqcomputer.com/582_90479_1.htm error is displayed: "Subscripted assignment dimension mismatch" "Error in ==> fminsearch at 175 fv(:,1)= funfcn(x,varargin{:});" What does it mean, and how can I solve the problem? Thanx a lot for any help! http://zhidao.baidu.com/question/246024990.html Top using fminsearch by spellucc » Thu, 14 Oct 2004 21:35:13 In article < XXXX@XXXXX.COM >, Chris < XXXX@XXXXX.COM > writes: >Hallo, > >please take a look at this function, used to create a lognormal error in >distribution. >----- >function res=PLN(a,d,s) > >r=(-(log(2*a)-log(d)).^2)/(2*s*s) > >f1=(1./(2*a*(s*sqrt(2*pi)))) > >res=f1.*f2 what is f2???? a is a vector? what are the optimization variables? in the sesne of this code this is "a" and d,s are two fixed additional parameters >----- >"d" and "s" are defined by input: >v=[ 0.3 10] f.e. > >d=v(1) >s=v(s) this is a pretty nice recursive definition of s, you mean s=v(2)? then: what is "a"?????? since d error in fminsearch is now a scalar, also a must be a scalar and using the .-operations is not useful > >Until here that works pretty fine. >I would like to use fminsearch to get the local minimizer "u": > >u=fminsearch(@PLN,v) v s the initial guess and PLN is a function of _ o n e _ variable of the length of v if d and s are scalar, then also a > >Then an error is displayed: >"Subscripted assignment dimension mismatch" >"Error in ==> fminsearch at 175 >fv(:,1)= funfcn(x,varargin{:});" > >What does it mean, and how can I solve the problem? > >Thanx a lot for any help! hth peter Top using fminsearch by Srinivasa » Sat, 25 Jul 2009 00:48:01 Hi all, I tried to use fminsearch as follows: arr = fminsearch('functionname',q1,q2,r1,r2); where functionname is a function that takes in four arguments q1, q2, r1, r2 (which are the initial guess)... but when I type the above in the command window, it gives me an error saying -------------------------------------------------- ??? Input argument "q2" is undefined. Error in ==> functionname at 18 Q = diag([q1,q2]) Error in ==> fminsearch at 205 fv(:,1) = funfcn(x,varargin{:}); -------------------------------------------------- But when I use the following: arr = fminsearch('functionname',q1,#,q2,r1,r2); where the # is any number...
知道日报 真相问答机 知道大数据 知道多世界 知道非遗 用户 知道芝麻 知道之星 芝麻将 芝麻团 知道行家 日报作者 机构合作 机构行家 开放平台 品牌合作 知道福利 财富商城 知道活动 特色 经验 问咖 宝宝知道 拇指医生 作业帮 手机版 我的知道 百度知道 >教育/科学 >人文学科 >语言学 ??? Subscripted assignment dimension mismatch. Error in ==> fminsearch at 175 fv(:,1) = funfcn(x,va 分享| 2011-03-31 09:37 蔡小泉688 可选中1个或多个下面的关键词,搜索相关资料。也可直接点“搜索资料”搜索整个问题。 subscripted assignment dimension mismatch fminsearch 搜索资料 我要回答 知道日报 全部文章 登录 还没有百度账号?立即注册 我也来回答换一换 新手帮助 如何答题 获取采纳 使用财富值 玩法介绍 知道商城 知道团队 行家认证 高质量问答 投诉建议 举报不良信息 意见反馈 投诉侵权信息 ©2016 Baidu 使用百度前必读|知道协议|百度知道品牌合作