Gonna be hard to troubleshoot this without seeing what hog_features_vector() returns, or what the dimensions of T are.
my guess is that you are trying to insert a row where you should be inserting a column, of vice versa.
x = rand(5,10);
y = rand(10,1);
x(1,:) = y;
x(:,1) = y;