finding the sparsity pattern of a matrix

조회 수: 3 (최근 30일)
Deepa Maheshvare
Deepa Maheshvare 2021년 2월 13일
댓글: Alamanda Ponappa Poovaya 2021년 3월 25일
I've a matrix created via symbolic multiplication
I'm sharing an example of the resulting matrix below (which is the RHS of ode dy/dt = F)
F =
[ f1*(k + c), f2, 0]
[ f1, f2, f3]
[ 0, f2, f3*(k)]
[ f1, 0, f3]
Differentiating F gives the jacobian.
In my real system, F is a banded matrix. I want to find sparsity pattern of the matrix(like the following) and supply for `JPattern` in `odeset`.
non_zero_F =
[1, 1, 0]
[1, 1, 1]
[0, 1, 1]
[1, 0, 1]
  댓글 수: 1
Alamanda Ponappa Poovaya
Alamanda Ponappa Poovaya 2021년 3월 25일
From my understanting, sparsity pattern of a matrix is a graphical representation which you can get using spy(s). Could you give more information on how you want to use this sparsity pattern?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by