필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Creating loop that produces variable values that meet convergence conditions with matrices.

조회 수: 1 (최근 30일)
I am trying to create a loop that will take the equation of A*x(i)=(1/k(i-1))*B*x(i-1) and solve for the x(i). Then produces the x(i) and k(i) that meet the conditions abs(k(i)-k(i-1))/k(i)<=error && abs(x(i)-x(i-1))/x(i)<=error.
k(i)=k(i-1)*(x(i) / x(i-1))
A=6x6 matrix of diagonal values along the main diag and the upper/lower diag around the
main diag
B=6x6 matrix of diagonal values along the main diag
The initial x(i-1=0) is equal to a 6x1 vector of 1's.
The initial k(i-1=0) is equal to a scalar of 1.
error=designated value of the error convergence criterion.
I know of using a for loop and if function but do not know just how to place it.

답변 (0개)

이 질문은 마감되었습니다.

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by