Effacer les filtres
Effacer les filtres

Solve eqn and get real part of solution in MatLab R2011b

1 vue (au cours des 30 derniers jours)
ly
ly le 9 Oct 2015
Commenté : ly le 9 Oct 2015
I use MatLab R2011b and want to solve an eqn and get the real part of solution. This is the code:
...
s=solve(y);
...
And this is solution: s =
0.3971412063699492853956558622094
-0.8763850946630804323385057262195
- 0.13537805585343442652857506799495 - 0.83663803641655759940578883730279*i
- 0.13537805585343442652857506799495 + 0.83663803641655759940578883730279*i
As you can see "s" has two solutions are real (0.3971 and -0.87638) and two imaginary (with i). The real solution is needed. Which command can be used in this case? Give the example is helpful.

Réponse acceptée

Walter Roberson
Walter Roberson le 9 Oct 2015

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics and Optimization 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