Symbolic Optimization
Mostra commenti meno recenti
I am trying to optimize a function which gives complex values.
I used fminunc, which gave me vector of complex values though I am giving a vector of real values as the initial guess.
When I used fmincon with FunValCheck property as 'on' it gave an error that problem is in the objective function supplied by the user.
Suggest a method to optimize such a function.
Risposte (2)
Sean de Wolski
il 18 Lug 2011
Well is the function supposed to give imaginary values? If it's not perhaps you coded the function wrong - we can't help without seeing it.
Else, you could either extract just the real part of the funtion, e.g.:
f = @(x)real(fft(x));
or the absolute value
f = @(x)abs(fft(x));
etc..
3 Commenti
FedRonTev
il 19 Lug 2011
Sean de Wolski
il 19 Lug 2011
I'm not an optimization expert, but that function doesn't exactly look at all well posed/stable. I mean 10 dimensions with how many uses of each variable and no constraints? Not to mention - does having an imaginary component double the number of dimensions? (I don't know, but would assume so)
It does have an imaginary component so at least that's correct.
All I can say is good luck!
I wouldn't trust any result you get or any airplane flying with an optimization of that function.
Sean de Wolski
il 19 Lug 2011
Hmm. I guess having an imaginary component wouldn't double the number of dimensions.
Walter Roberson
il 18 Lug 2011
0 voti
It is an error to use fminbnd() with complex variables or with a function that returns a complex value.
If I recall correctly, the only function that is usable with complex values is the Optimization Toolbox's fgaolattain() -- though perhaps one of the Global Optimization Toolbox's functions could be used.
On the other hand you asked for symbolic optimization in your title; symbolic optimization with complex values is, I believe, available in the symbolic toolbox using MuPad.
1 Commento
Sean de Wolski
il 18 Lug 2011
fgoalattain*
Categorie
Scopri di più su Common Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!