optimization problem of areas
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Daniele Sonaglioni
am 25 Nov. 2020
Kommentiert: Matt J
am 25 Nov. 2020
Hi everyone,
I'm trying to minimiza and area. In my problem I have an exerimental curve and a polynomial and i want to minimiza the area between the two.
I have tried with this code but it does not work very well:
%%%%%%%%%%%%%%%%
x=( Cp5_diff(m(1):c(1))-polyval(z,T10(m(1):c(1))) );
Area2=@(z) sum( ( x.*dt(m(1):c(1)) ) );
best_z=fminsearch(Area2,z);
%%%%%%%%%%%%%%%%
Do you have any suggestion?
Thank you!
0 Kommentare
Akzeptierte Antwort
Matt J
am 25 Nov. 2020
Bearbeitet: Matt J
am 25 Nov. 2020
Your objective function Area2 is written to be a function of z, but nothing in
sum( ( x.*dt(m(1):c(1)) ) )
depnds on z. Perhaps this is what you intended,
x= @(z) ( Cp5_diff(m(1):c(1))-polyval(z,T10(m(1):c(1))) );
Area2=@(z) sum( ( x(z).*dt(m(1):c(1)) ) );
2 Kommentare
Matt J
am 25 Nov. 2020
I'm very glad, but please Accept-click the answer to indicate that it resolved the problem.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surrogate Optimization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!