0001 function [ix_act_ex, jx_act_ex, ix_act, jx_act, Wact, Lact] = ...
0002 vb_current_area_info(Jinfo,ix_area)
0003
0004
0005
0006
0007
0008 Lact =Jinfo.Lact ;
0009 ix_act =Jinfo.ix_act ;
0010 Nact = length(ix_act);
0011
0012 if isfield(Jinfo,'ix_act_ex')
0013
0014 ix_act_ex = Jinfo.ix_act_ex ;
0015 Nact_ex = length(ix_act_ex);
0016
0017 if ~isempty(ix_area),
0018
0019 [jx_act_ex, ix_act_ex] = vb_index2indexsub(ix_area, ix_act_ex);
0020 else
0021 jx_act_ex = 1:length(ix_act_ex);
0022 end
0023
0024 Wact = Jinfo.Wact ;
0025 Wact = Wact(jx_act_ex,:);
0026
0027
0028 jx_act = find( sum(Wact, 1) > 0);
0029 Wact = Wact(:,jx_act);
0030 ix_act = ix_act(jx_act);
0031 if Lact > 1
0032 jx_act = repmat(jx_act(:),1,Lact) ...
0033 + repmat([0:Lact-1]*Nact,length(jx_act),1);
0034 jx_act_ex = repmat(jx_act_ex(:),1,Lact) ...
0035 + repmat([0:Lact-1]*Nact_ex,length(jx_act_ex),1);
0036 jx_act = jx_act(:);
0037 jx_act_ex = jx_act_ex(:);
0038 end
0039 else
0040
0041 if ~isempty(ix_area),
0042
0043 [jx_act, ix_act] = vb_index2indexsub(ix_area, ix_act);
0044 else
0045 jx_act = 1:length(ix_act);
0046 end
0047
0048 if Lact > 1
0049 jx_act = repmat(jx_act(:),1,Lact) ...
0050 + repmat([0:Lact-1]*Nact,length(jx_act),1);
0051 jx_act = jx_act(:);
0052 end
0053
0054 ix_act_ex = ix_act;
0055 jx_act_ex = jx_act;
0056 Wact = [];
0057 end