"Matt J" wrote in message <firstname.lastname@example.org>... > "David " <email@example.com> wrote in message <firstname.lastname@example.org>... > > Hi, > > > > I have some data in a matrix with size 50*2. Now i want to add weights to my data so that I can have some good clustering of data. > > > > How can I add weights to data?? > > Assuming your weights is 50x1, > > weighted_data = bsxfun(@times, weights, data50x2)
Will this function still works if my data increases,.... like 50*4, 50*5, 100*6 etc.