Adding 1d matrices of different sizes

    Jun 27 2010 | 10:12 pm
    I wanted to add a 2cell matrix with a 5 cell matrix with the result being that the 3 cells that are extra to keep their original value. But I can only add up those matrices if they are the same size, apparently. And if I change the 2cell matrix to be a 5 cell matrix, the 2 cells repeat themselves in the new matrix ad infinitum (ex in this case: [200. 300., 500. 600] become [200. 300., 500. 600., 200. 300., 500. 600., 200. 300.] .. and this ruins everything as pointed above.
    The desired result should be 200. 500., 300. 600., 0. 0., 0. 0., 0. 0.
    Thank you all for any input!

    • Jun 28 2010 | 8:20 am
      I've mistaken about that part with "ad infinitum:. It seems that the values stretch. But I still don't know how to mix those 2 matrices.
    • Jun 28 2010 | 4:45 pm
      I am not sure of what you, but her's what I have understood:
      Is that what you want ?
    • Jun 28 2010 | 9:23 pm
      I really appreciate your help, Ad.!!! What you did is great!
      But unfortunately, once I change the dimension of the matrix with non-zero values (in this case [dim 1 1]), everything changes back to numbers repeating themselves! And when I change back to [dim 2 1], it stays the same!
      May I ask what the @adapt 0 does? I don't see it in the help file. And by the way.. It seems I don't need the second matrix that goes into the right inlet of jit.op as it works without it (jit.op outputs the desired 200. 500., 300. 600., 0. 0., 0. 0., 0. 0. matrix without me clicking on the respective matrix). Unfortunately that lasts, as mentioned, until I play with de dim values (and I really need to have access to that). After that, i have to restart the patch to reset to what you did!
      Do you know how to fix this?
      and the last version of the patch ..
    • Jun 28 2010 | 9:33 pm
      Well, I tested the patch without @adapt 1 and it works as well (but only without making any changes to dim). :(
    • Jun 28 2010 | 11:03 pm
      lately, when visiting this forum I feel like I am going to the shrink! I tell my problems and I end up giving the answers myself, but not before talking to the psychiatrists on duty! :P
      Once again @usedstdim came to the rescue!
      Thank you Ad. for your patience and help!
    • Jun 29 2010 | 7:01 am
      nO problem guy! I don't really have impression to have helped you…I do understand now what you wanted with your final patch :)