필터 지우기
필터 지우기

Sparse linear system of equations

조회 수: 1 (최근 30일)
Jim Oste
Jim Oste 2015년 2월 16일
답변: James Tursa 2015년 2월 17일
I'm given the following: [I_N - (N+1)^2]*B_N = V_N where N ≥ 3, I_N is and N x N identify matrix, B_N is the N x N matrix with (i,j)-th entry
B_N (i, j) =
0 if |i j| > 1
1 if |i j| = 1
2 if |i j| = 0
1<= i,j <= N
V_N is given and U_N is unknown. How would I right a function that sets up the B_N piece-wise and solved the linear system?
  댓글 수: 2
James Tursa
James Tursa 2015년 2월 16일
Please edit your question to make the problem more clear. E.g., you mention U_N is unknown, but U_N doesn't seem to appear in your problem statement.
Jim Oste
Jim Oste 2015년 2월 17일
I apologize. The given equation should be: [I_N - ((N+1)^2)*B_N]*U_N = V_N

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

채택된 답변

James Tursa
James Tursa 2015년 2월 17일
Are you just asking how to construct B_N? E.g.,
B_N = spdiags(repmat([-1 2 -1],N,1),[-1 0 1],N,N);
A_N = speye(N) - ((N+1)^2)*B_N;

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by