필터 지우기
필터 지우기

I have a third degree equation, with variable a matrix of 256*256. How can I solve it in MATLAB?

조회 수: 3 (최근 30일)
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
KSSV
KSSV 2017년 9월 14일
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.
Anshika Goel
Anshika Goel 2017년 9월 14일
편집: Anshika Goel 2017년 9월 15일
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.
By splitting the matrix into sub blocks, the program is taking much time to execute.

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2017년 9월 15일
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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by