Problem related to fminbnd
2 次查看(过去 30 天)
显示 更早的评论
I am finding the minimum value of Lr in the non-linear function. but whatever value of constants I change there is no effect on the minimum value. Also the minimum value I am getting is not correct.
fun=@(Lr)(((Vin*Cr*Lm)/(((((Z*Cc)+((A+(B*Cr))*((B*Cr)+C)*Lr))/Cc)+((ilm*ilm*Lm*Cc)/(((Z*Cc)+((A+(B*Cr))*((B*Cr)+C)*Lr))/Cc)))*(((1-D)*Ts)-((ilm*Lm)/(((Z*Cc)+((A+(B*Cr))*((B*Cr)+C)*Lr))/Cc)))))+((Lr*(((((Z*Cc)+((A+(B*Cr))*((B*Cr)+C)*Lr))/Cc)+((ilm*ilm*Lm*Cc)/(((Z*Cc)+((A+(B*Cr))*((B*Cr)+C)*Lr))/Cc)))*(((1-D)*Ts)-((ilm*Lm)/(((Z*Cc)+((A+(B*Cr))*((B*Cr)+C)*Lr))/Cc)))))/(Lm*Vin))+((C*Lr)/Vin));
[Lr,fval] = fmincon(fun,0,10e-6)
where all other variables are constants and their resp. values are given
0 个评论
采纳的回答
Matt J
2020-2-23
编辑:Matt J
2020-2-23
You could plot the function to see how its shape varies with the parameters and to confirm whether fminbnd is giving the correct result.
12 个评论
Matt J
2020-2-23
You are quite welcome, but please Accept-click the answer to indicate that your question was addressed.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!