Get the real function output to simplify without the real function in the output.

1 vue (au cours des 30 derniers jours)
Jordan Armstrong
Jordan Armstrong le 28 Juin 2021
Modifié(e) : Jonas le 28 Juin 2021
I am trying to get matlab to take the real part of a function. However, I want the output to not contain the real function in the answer. I am trying to do this for optimization via BARON and BARON does not handle having the real function in the objective function. The variables I am dealing with are real and nonnegative, and I declare the symbolic variables to be as such. How do I get the real function output to not contain the real function.

Réponses (1)

Jonas
Jonas le 28 Juin 2021
realPart=z-imag(z);
has no real() function
  2 commentaires
Jordan Armstrong
Jordan Armstrong le 28 Juin 2021
The same issue happens when using the imag() function on our equation.
Jonas
Jonas le 28 Juin 2021
Modifié(e) : Jonas le 28 Juin 2021
i dont know about that function, what about abs(z)*cos(angle(z)) or 0.5*(z+z')

Connectez-vous pour commenter.

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!

Translated by