Menu

Matrix compare operations

Steve
2006-01-23
2012-09-15
  • Steve

    Steve - 2006-01-23

    Hello,

    I'd first like I say I'm enjoying learning IT++ under Cygwin, and porting my Matlab code over.

    I've run into a couple of things about IT++ that I was a little surprised about, and maybe you can clarify why they're not implemented.

    The first is comparing a matrix to a scalar element-wise. This is implemented with vectors, so why not matrices?

    The second thing that I'm missing (that I enjoy from Matlab) is something like the following:

    mat a = "1 2 5 4 5 8";
    a("2 5") = "3 6";

    which would result in a == "1 2 3 4 5 6". In particular this is nice when you want something like

    ivec q = find(a == 5);
    a(q) = 4;

    Or maybe there is another way I'm not seeing to implement this sort of thing?

    Thanks for your hard work guys,
    Steve

     
    • Adam Piątyszek

      Adam Piątyszek - 2006-01-24

      Hi Steve,

      Thanks for your comments.
      As for the element-wise comparison of a matrix and scalar, it would be great if you could provide a patch with this functions. We have limited time to work on IT++ ;-)

      Concerning the assignments in the form:
      vec a(6);
      a("1 4") = "3 6";
      they are also not implemented. If you have an idea how to do it easily, you are welcome to post the solution to the feature request tracker.

      Thanks for using IT++.

      /ediap

       
    • Steve

      Steve - 2006-01-27

      Adam,

      I appreciate the reply. I'd like to give that a try, when I get more time. I just implemented a systematic version of your BCH encoder/decoder class. Given your existing code, it was very easy to modify to make the codewords systematic. When I get a chance I'll clean it up and post it.

      Thanks again,
      Steve

       

Log in to post a comment.