image thumbnail
from Particle Swarm Optimization Toolbox by Brian Birge
With Trelea, Common, and Clerc types along with ...

forcerow.m
% forcerow.m
% function to force a vector to be a single row
%
% Brian Birge
% Rev 2.0 - vectorized
% 7/1/98

function[out]=forcerow(in)
len=prod(size(in));
out=reshape(in,[1,len]);

Contact us at files@mathworks.com