![]() |
|
#1
|
|||
|
|||
c++ matrix operationHi!
I'm building a Class for matrixes. I have already built several funtions for adding, subtracting, transpose, multiply,.. Now I'm trying to do a functions to calculate the dot and cross products as well as calculating the transpose and the inverse of a matrix. And also the methods to traverse the matrix row by row as well as column by column. Can anyone help me? CPP / C++ / C Code:
Last edited by LuciWiz : 10-May-2007 at 06:08.
Reason: Fixed ending code tag
|
|
#2
|
|||
|
|||
Re: c++ matrix operationQuote:
1. Post the code that you tried, including a main() function that tests the operation in question. 2. Post the input that you gave the function for testing 3. Show the output that the program. 4. Tell us what you don't understand about the difference between 2 and 3. If by "traversing" you mean printing out the values of the elements, then just make two loops: If you want to print out row by row: The outer loop index ranges from 0 to the number of rows and the inner loop ranges from 0 to the number of columns. Print out the matrix value for each step of the inner loop. For the inverse: well, that's a little more involved. One of the more popular and effective methods is called Gauss Jordan. Look it up. Regards, Dave |
Recent GIDBlog
Welcome to Baghdad by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help... A small problem with allocating memory | Cristovao | C++ Forum | 4 | 17-Jan-2007 15:17 |
| i need help in C++ PLZ | its_me | C++ Forum | 3 | 04-Dec-2006 21:51 |
| debugging multi-dimensional vector/ matrix class | counterflow | C++ Forum | 1 | 15-Mar-2006 12:14 |
| Combining Vectors and References | Frankg | C++ Forum | 7 | 14-Jan-2006 06:17 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The