how to solve many polynomial equations listed in a matrix?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Rikke
el 24 de Mzo. de 2019
Comentada: Rikke
el 25 de Mzo. de 2019
I have a matrix where each row is a polynomial equation:
A=[0.01 620.085 -3750
0.01 620.082 -3750
0.01 620.079 -3750
0.01 620.076 -3750];
I want to solve every row of matrix A. How can i do that, I tried:
for i=1:length(A)
I(i)=roots(A(i,:))';
end
I want to get the answer as follows:
I= [I(1,1) I(1,2)
I(2,1) I(2,2)
I(3,1) I(3,2)
I(4,1) I(4,2)];
0 comentarios
Respuesta aceptada
madhan ravi
el 24 de Mzo. de 2019
Roots = arrayfun( @(x) roots( A( x, : ) ), 1 : 4, 'un', 0 );
[ Roots{ : } ].'
Ver también
Categorías
Más información sobre Polynomials en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!