我有一个求极值的函数​,想做成for循环,​请问用Matlab应​该怎么做呢?

7 visualizaciones (últimos 30 días)
chunyi liu
chunyi liu el 22 de Jun. de 2022
各位大佬,我有一个求极值的函数,想做成for循环,请问用Matlab应该怎么做呢?
大概内容是,分别求参数b=[1 2 3 4 5]时对应的函数G的极小值点
类似:
syms x
for b=1:1:5;
G=x.^2-b.*x+1;
f=inline(G);
x=fminbnd(f,0,10)
end

Respuestas (0)

Categorías

Más información sobre MATLAB 中的 Python 库 en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!