I have a third degree equation, with variable a matrix of 256*256. How can I solve it in MATLAB?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Anshika Goel
el 14 de Sept. de 2017
Comentada: Anshika Goel
el 17 de Sept. de 2017
I have tried to solve it using fsolve; but it is solving only upto 64*64 matrix. The equation is ax^3+bx^2+cx+d=0; where a,b,c and d are constant matrix of 256*256 size. And x is variable of same size 256*256.
2 comentarios
KSSV
el 14 de Sept. de 2017
Then you can split your matrix into sub blocks of size 64*64 and solve it..:)
By the way what equation it is? You have to show us the code.
Respuesta aceptada
KSSV
el 15 de Sept. de 2017
Let A,B,C,D be your respective coefficients (Ax^3+Bx^2+Cx+D=0) of size 256*256..
R = zeros(n,n,3) ; % roots initialized
for i = 1:n
for j = 1:n
p = [A(i,j) B(i,j) C(i,j) D(i,j)] ;
r = roots(p) ;
R(i,j,:) = r ;
end
end
Más respuestas (0)
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!