Simple Matrix Operations?

This is a discussion on Simple Matrix Operations? within the C++ Programming forums, part of the General Programming Boards category; I am having problems figuring out how to run simple matrix operations in a program. I am trying to write ...

  1. #1
    Registered User
    Join Date
    Dec 2003
    Posts
    2

    Simple Matrix Operations?

    I am having problems figuring out how to run simple matrix operations in a program. I am trying to write a encoder using an encoding matrix and can't figure out how to ask the computer to handle the matrices. Please help!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,499
    int matrix[10][10];
    What else?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Dec 2003
    Posts
    2
    I have to be able to find the inverse of a matrix and also multiply matrices together. It is a long and complicated process if you do it by hand and I want a computer program which will do it. The idea will be applied to cyrptography and communications.

  4. #4
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Use your normal formulas. Where exactly are you having problems? What have you tried?

    Also, beware, unless your matrices are of a special type, finding dterminants is a positively hideous problem for large enough matrices.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  5. #5
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,701
    Where is your work? Post what you have done and describe the specific problems you are having with it.
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 01:03 AM
  2. Simple operator overloading issue
    By Desolation in forum C++ Programming
    Replies: 1
    Last Post: 05-09-2007, 08:56 PM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM
  5. matrix program
    By J in forum C Programming
    Replies: 4
    Last Post: 04-21-2002, 08:07 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21