Wednesday, 28 August 2013

Make vectors of unequal length equal in length by reducing the size of the largest ones

Make vectors of unequal length equal in length by reducing the size of the
largest ones

I am reading 6 columns from a .txt file to 6 vectors.
Sometimes some vectors are one element larger than others, so I need to
check if they are all of equal length, and if not, I have to find which
ones are the largest and delete their last element. I think I should be
able to do this without loops. I was originally thinking of using find in
combination with isequal but isequal only returns a logical, and does not
provide any information on which vectors are the largest.

No comments:

Post a Comment