How to minimise a function with three input arguments in least squared sense in MATLAB ?
Ältere Kommentare anzeigen
I was having a look at the x = lsqnonlin(fun,x0,lb,ub) command in Matlab. But as the syntax shows, the function 'fun' has only one variable 'x' whose initial value is x0 and optimised lb < x < ub. But what If I have a function with three input variables. All the three variables have upper and lower limits respectively. And my objective is to minimise the function with optimal values of these three variables within the specified range. Eg: t = function(x,y,z) I would like to find optimal values of x,y, and z such that value of t is minimised.
Antworten (1)
Torsten
am 20 Mär. 2015
0 Stimmen
x0, lb and ub are not necessarily scalars, but can also be vectors of length 3 ...
Best wishes
Torsten.
2 Kommentare
quicklearner
am 23 Mär. 2015
Torsten
am 24 Mär. 2015
Then pass a new function to lsqnonlin in which you call your symbolic function n times to compute the vector (f1,f2,...,fn).
Best wishes
Torsten.
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!