fminsearch with multiple variables
Afficher commentaires plus anciens
I have an assignment that I have to use fminsearch to find minimum potential energy. I've seen similar questions asked all giving different styled answers but haven't had any luck getting it to work. Basically I'm given an equation for potential energy in respect to x and y. From (0:90) degrees I have to use the fminsearch to find minimum PE and x,y. I know this is a basic function but I've never used it before and it's giving me errors.
t=(0:90);
x=20.*sin(degtorad(t));
y=20.*cos(degtorad(t));
p = 4.*(x.^2)-0.1.*(x.^2)+4.*abs(y.^2).^(1.8);
Preferably I'd like my fminsearch to output x,y and the p values at once. Is this possible in just one function?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Linear Least Squares 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!