Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-24-2008, 08:34 PM
hybridalter hybridalter is offline
Newbie
 
Join Date: Apr 2008
Posts: 7
Rep Power: 0
hybridalter is on a distinguished road
Exclamation struct Matrix functions?

Working with C on ms visual studio2005:

Is there a way i can multiply 2 matrices (dimensions of NxM) without having to do dot product?

can anyone post an example source code?

here are two matrices for example:

set A: (3x3)
1 -5 6
3 5 -7
9 8 4

set B: (3x3)
2 -3 4
-8 7 5
6 1 9
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 04-25-2008, 12:59 AM
v0id's Avatar   
v0id v0id is offline
Retired
 
Join Date: Apr 2007
Location: Denmark
Posts: 2,654
Last Blog:
CherryPy(thon)
Rep Power: 29
v0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of lightv0id is a glorious beacon of light
Send a message via MSN to v0id
Default Re: struct Matrix functions?

What do you mean by a "dot product"?
I would run through the matrices using a loop.
__________________
05-03-2007 - 11-13-2008
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-25-2008, 12:55 PM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 3,421
Last Blog:
wxWidgets is NOT code ...
Rep Power: 37
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default Re: struct Matrix functions?

I believe the Boost library has support for matrix classes, which might take care of your problem for you. If you are manually creating matrices, then I would create the class and overload the * operator.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: C++ Functions Jordan C Tutorials 2 04-22-2008 03:09 PM
Understanding the differences between a class and struct in C# : Jordan CSharp Tutorials 4 04-20-2008 10:32 AM
sizeof Struct Eagle_ C and C++ 2 11-18-2007 11:15 AM
Need help on matrix. sania21 Java Help 15 06-28-2007 04:29 AM
Flex, bison multifunction calculator annatsos C and C++ 1 01-04-2007 07:00 AM


All times are GMT -5. The time now is 11:13 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 101%


Complete - Celebrate!

Ads