Get elements of a matrix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 8rea
    New Member
    • Jun 2008
    • 4

    Get elements of a matrix

    Hello,

    I have got a matrix and I want to get his elements so I can work with them in an unsigned int[][] or in a similar way.

    I have proved to get them with the method Element but it returns an array and I think it don't do what I want, something like this L[i][j];

    Another thing that I have thought is to change this matrix into a String like this, but then I found the same problem. I don't know how to get this elements!


    System::Drawing ::Drawing2D::Ma trix^ L;
    System::String^ labelString=L->ToString();


    Could anyone of you help me?

    Thank you in advanced!
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    The Elements property (not method) of the class returns all the elements of the matrix in a single dimension array. It should be easy enough to pick out the elements you are interested in from this array.

    Comment

    • 8rea
      New Member
      • Jun 2008
      • 4

      #3
      and do you know how to make it?
      I don't understand the constructor
      I have made that

      labelledImage->Elements(cli:: array<int>(1)^g et());

      and I get these errors:

      error C2143: syntax error : missing ',' before ')'
      error C2059: syntax error : ')'
      error C2143: syntax error : missing ',' before ')'
      error C2059: syntax error : ')'

      Comment

      • 8rea
        New Member
        • Jun 2008
        • 4

        #4
        ok I have found a solution!!!

        Thank you so much!!

        Comment

        Working...