How to Iteratively optimise an equation [OPTIMTOOLBOX]
    2 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    Meddour Aissam riad
 le 2 Oct 2020
  
    
    
    
    
    Réponse apportée : Alan Weiss
    
      
 le 5 Oct 2020
            Hi there ,
i want to Iteratively optimize an equation
Let me show you a simplified example here :
Ws=1:1:60
Objectif_Function= 12*sqrt(L)+Ws*T0 %% Equation to minimize with T0 THE OPTIMIZATION VARIABLE
I want to get all the optimized T0 for each value of Ws  [T0(Ws)]
i'am using the Optimtoolbox Plateform and i don't know how to manage in order to do that
0 commentaires
Réponse acceptée
  Alan Weiss
    
      
 le 5 Oct 2020
        Are you asking how to write a loop in MATLAB or how to store the results? This is just a sketch, it is missing some values, but should get you started:
Ws=1:1:60
solutions = zeros(size(Ws));
for i = WS
    fun = @(T0)12*sqrt(L)+Ws*T0; % or whatever your real problem is
    solutions(i) = fmincon(fun,OTHER,PAREMETERS, GO,HERE);
end
Alan Weiss
MATLAB mathematical toolbox documentation
0 commentaires
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur Get Started with Optimization Toolbox dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

