matlab dividing 2 vectors that don't have the same length

Discussion in 'Mac Programming' started by lefou, Mar 14, 2009.

  1. lefou macrumors newbie

    Mar 14, 2009
    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 ?



    Attached Files:

  2. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    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?


Share This Page