Effacer les filtres
Effacer les filtres

find minimum of function with four variables using simplex search method of nelder and mead

4 vues (au cours des 30 derniers jours)
Hi community. Please help me. Following is the code I have written, but it does not work and is showing an error.
Failure in initial objective function evaluation. FMINUNC cannot continue.
My code is:
close all; clc; clear all;
syms p1 p2
f=@(D) 0.008*D^-1/3
f=@(D,p1,L,r) 7.84*D.^2*p1+450000+36900*D+6.57*10.^6/L+(772*10.^6/L)*(r.^0.219-1)
x0=[1 1];
f=@(D,p1,L,r) -(7.84*D.^2*p1+450000+36900*D+6.57*10.^6/L+(772*10.^6/L)*(r.^0.219-1));
x0=[-1 -1];

Réponses (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov le 26 Mai 2021
There are some variables undefined in your defined function handle f.


Community Treasure Hunt

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

Start Hunting!

Translated by