Problem 85. Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the roots of the polynomial have a positive real part, the behavior of the system will be divergent. Given a cell array of vectors that represent polynomials, remove the ones that have roots with positive real components.
Example:
polyIn = {[1 1],[1 -1]}
polyOut = {[1 1]}
since roots([1 -1]) is 1, a positive number.
Solution Stats
Problem Comments
-
5 Comments
Show
2 older comments
Brandon
on 13 Jun 2023
How does [1 1] represent a polynomial? This problem should read "Remove sets with negative numbers" instead.
Christian Schröder
on 14 Jun 2023
@Brandon polynomials in MATLAB are represented by a vector of coefficients; see doc roots.
Aditya Bapat
on 5 Mar 2024
interesting problem
Solution Comments
Show commentsProblem Recent Solvers1703
Suggested Problems
-
Project Euler: Problem 2, Sum of even Fibonacci
2498 Solvers
-
Back to basics 25 - Valid variable names
328 Solvers
-
Are all the three given point in the same line?
583 Solvers
-
Calculate the area of a triangle between three points
3142 Solvers
-
Convert a Cell Array into an Array
1929 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!