Home > vbmeg > functions > estimation > bayes > vb_convert_current_j.m

vb_convert_current_j

PURPOSE ^

Jact = vb_convert_current_j(Zact, Wact, Lact)

SYNOPSIS ^

function Jact = vb_convert_current_j(Zact, Wact, Lact)

DESCRIPTION ^

 Jact = vb_convert_current_j(Zact, Wact, Lact)
 Jact = Wact * Zact
 Wact : Spatial smoothing matrix of focal window
 Lact : # of current component

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    Jact = vb_convert_current_j(Zact, Wact, Lact)
0002 % Jact = vb_convert_current_j(Zact, Wact, Lact)
0003 % Jact = Wact * Zact
0004 % Wact : Spatial smoothing matrix of focal window
0005 % Lact : # of current component
0006 %
0007 % Copyright (C) 2011, ATR All Rights Reserved.
0008 % License : New BSD License(see VBMEG_LICENSE.txt)
0009 
0010 [Njact, Tall, Ntry] = size(Zact);
0011 
0012 if Njact==0, Jact = Zact; return; end;
0013 
0014 [Njact_ex , NWact]= size(Wact);
0015 
0016 if NWact*Lact ~= Njact,
0017     fprintf('size(W)= [%d x %d], size(Zact)= %d, L = %d\n', ...
0018             Njact_ex, NWact, Njact, Lact)
0019     error('Size of W is not matched to J')
0020 end
0021 
0022 Jact  = Wact * reshape(Zact,  [Njact/Lact, Lact*Tall*Ntry]); 
0023 Jact  = reshape(full(Jact),  [Njact_ex*Lact, Tall, Ntry]); 
0024 
0025 return

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005