Hello. Anyone knows why the fminsearch does not work. Is it the way the code is structured ?
Afficher commentaires plus anciens
clear all
clc
S = 17.1
W = 1248.5*9.81
rho = 1.225
speedsound = 340.26
h = 0
% u = x(1)
% CL = x(2)
% x0 = [20,0]
qbar = 0.5*rho*x(1)^2*S
T = (3*( (7+ x(1)/speedsound)*200/3 + h/1000*(2*x(1)/speedsound - 11) ) )
CD = 0.03 + 0.05*x(2)^2
D = qbar*CD
ROC = (T-D)*x(1)/W
fun = @(x) -1* (T-D) * x(1) / W
x0 = [20,0]
x = fminsearch(fun,x0)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Numeric Solvers dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!