PDA

View Full Version : matlab dividing 2 vectors that don't have the same length




lefou
Mar 14, 2009, 04:48 PM
Hi everybody,

well, my problem is with matlab. it's about dividing a row A containing 2700 values by a column B containing 168 values.

my first question : is it possible to divide them while they don't have the same length ?

if I suppose that the result is C=A/B, I want that C will also be a vector, cause when I obtain C, I have to plot a 2 dimension graph of x and y, where x is the time and y is C...

I attached a part of the file, where you will find 256 different values in row A and 168 value in column B

anyone has an idea ?

thanks

lefou



lee1210
Mar 14, 2009, 04:59 PM
You might need to define this more clearly. I have no matlab experience, but do you want to divide each position in A by the value in B at position posA mod 168? Just divide the first 168 elements of A by the corresponding element in B?

-Lee