Thread: matrix

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    4

    matrix

    wat is meant by traversing a matrix

    and also can any one tell me the concept of traversing a "matrix helically"??


  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    When you traverse something, you walk it. When you traverse helically, you walk in a spiral. Thus, in the case of a matrix, you'd walk something like so:
    Code:
    789
    612
    543
    Start at one, end up at nine.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Ultraviolence Connoisseur
    Join Date
    Mar 2004
    Posts
    555
    wat is meant by traversing a matrix
    well a matrix is usually represented by a two dimensional array....traversing would mean looping through it ie:
    Code:
    #include <stdio.h>
    
    int main()
    {
            int r, c, matrix[6][6];
    
            for (r=0;r<6;r++)
                    for(c=0;c<6;c++)
                            matrix[r][c]=(c+r) % 2;
    
            for (r=0;r<6;r++) {
                    printf("{");
                    for(c=0;c<6;c++)
                            if (c==0)
                                    printf("%d",matrix[r][c]);
                            else
                                    printf("%3d",matrix[r][c]);
                    printf("}\n");
            }
    
            return 0;
    }
    sets up a matrix and displays it.
    Last edited by nonpuz; 04-03-2004 at 04:53 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C - access violation
    By uber in forum C Programming
    Replies: 2
    Last Post: 07-08-2009, 01:30 PM
  2. Matrix Help
    By HelpmeMark in forum C++ Programming
    Replies: 27
    Last Post: 03-06-2008, 05:57 PM
  3. Gauss-Jordan Matrix Inversion in C++
    By Max_Power82 in forum C++ Programming
    Replies: 3
    Last Post: 12-03-2006, 08:31 PM
  4. Matrix and vector operations on computers
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-11-2004, 06:36 AM