Solve eqn and get real part of solution in MatLab R2011b

1 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2015-10-9

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Mathematics and Optimization 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by