How can I tell MATLAB to discard two roots and only proceed with one value?
Show older comments
I used the matlab function "roots" to find the roots of a cubic. This is within a for loop, so the values are always changing based on my inputs, but the three roots are generally along the lines of:
T2 =
1.0e+04 *
2.658308259664422
-0.442009626219650
0.057471418250745
How can I tell matlab to take the 0.057471418250745 value and discard the other two values going forward? I'm trying to simulate the brayton cycle if that helps.
Thanks! Tom
Accepted Answer
More Answers (1)
Thomason
on 10 Feb 2013
0 votes
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!