repo.or.cz
/
wrf-fire-matlab.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
same solution lambda but u v w different
[wrf-fire-matlab.git]
/
util1_jan
/
extract_sp.m
blob
5013c5dca9acee2fa94414df9cdf83aaae8b2b5b
1
function v=extract_sp(i,j,a,ii,jj)
2
% a=extract_sp(i,j,a,ii,jj)
3
% get s square submatrix (as dense) for index span ii jj
4
% from a sparse matrix (i,j,a)
5
% i, j do not need to be > 0
6
7
for k=1:length(a)
8
iv=i(k);
9
jv=j(k);
10
ix= (ii==iv);
11
jx= (jj==jv);
12
v(ix,jx)=a(k);
13
end
14
end