我有一个求极值的函数,想做成for循环,请问用Matlab应该怎么做呢?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
各位大佬,我有一个求极值的函数,想做成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
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre MATLAB 中的 Python 库 en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!