Menu

problem with matrix

Help
2003-10-10
2003-12-03
  • Umberto Carrara

    Umberto Carrara - 2003-10-10

    if copy a matrix to an other matrix
    with a
    for {set i 0} {$i < $rows} {incr i} {
            m1 insert row end [m2 get row $i]
    }
    in m1 i found only first element in row of m2
    where i fall?
    thanks
    Umberto

     
    • Andreas Kupries

      Andreas Kupries - 2003-12-03

      Have you told m1 how many columns it has before you started insertion ? If m2 has 10 columns, but m1 only 2, then only two columns will be copied.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.