%%%%%
%%%%%
%%%%% arr2vec

function [vec] = arr2vec(arr,w);

[row col] = size(w);
vec = [];
for i = 1:row,
  vec = [vec;arr(1,1,i)];
end

