Offline
Newbie
Karma: 0
Posts: 4
|
 |
« on: May 19, 2012, 07:31:48 pm » |
can anyone help me with a program that receives two square matrices from the serial interface one by one and performs matrix multiplication then resends the result matrix on the serial interface , refrences to read , or code to build up from .
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Tesla Member
Karma: 89
Posts: 6388
-
|
 |
« Reply #1 on: May 19, 2012, 07:39:31 pm » |
You need to receive the matrix definitions in some format, store them in memory, perform the matrix multiplication, send the resulting matrix back over the serial interface (presumably in a similar format to the received. Individually, all of these seem simple enough.
Which part of this are you having trouble with?
|
|
|
|
|
Logged
|
|
|
|
|
Austin, TX
Offline
Faraday Member
Karma: 41
Posts: 5172
CMiYC
|
 |
« Reply #2 on: May 19, 2012, 07:40:53 pm » |
If you just need matrix multiplication, why use an Arduino at all?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #3 on: May 19, 2012, 07:45:03 pm » |
unfortunatley , it's an assignment in college , and i dodn't understand what they want definitely
|
|
|
|
|
Logged
|
|
|
|
|
California
Offline
Edison Member
Karma: 41
Posts: 1869
|
 |
« Reply #4 on: May 19, 2012, 07:47:43 pm » |
Start small with Serial communication and work your way up.
I'm guessing this is URGENT because you didn't look at this until the last minute?
|
|
|
|
|
Logged
|
|
|
|
|
Austin, TX
Offline
Faraday Member
Karma: 41
Posts: 5172
CMiYC
|
 |
« Reply #5 on: May 19, 2012, 07:56:30 pm » |
unfortunatley , it's an assignment in college , and i dodn't understand what they want definitely
So the assignment was: "Multiple a matrix on an Arduino. If necessary wait until the last minute and post in the forums"?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #6 on: May 19, 2012, 08:05:59 pm » |
unfortunatley , it's an assignment in college , and i dodn't understand what they want definitely
So the assignment was: "Multiple a matrix on an Arduino. If necessary wait until the last minute and post in the forums"? If you can help i will be thankful for you , if you can't KEEP SILENCE
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #7 on: May 19, 2012, 08:10:31 pm » |
am I wrong ?!
|
|
|
|
|
Logged
|
|
|
|
|
Austin, TX
Offline
Faraday Member
Karma: 41
Posts: 5172
CMiYC
|
 |
« Reply #8 on: May 19, 2012, 08:16:37 pm » |
am I wrong ?!
Am I? You still haven't said what part of your homework assignment you are having trouble with. If your expectation is to have someone write it for you, you can stop trying now.
|
|
|
|
|
Logged
|
|
|
|
|
California
Offline
Edison Member
Karma: 41
Posts: 1869
|
 |
« Reply #9 on: May 19, 2012, 08:18:36 pm » |
am I wrong ?!
Wrong about what your assignment is? How would we know?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Melbourne, Australia
Offline
Shannon Member
Karma: 218
Posts: 13897
Lua rocks!
|
 |
« Reply #10 on: May 19, 2012, 09:41:36 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA
Offline
God Member
Karma: 4
Posts: 673
|
 |
« Reply #11 on: May 19, 2012, 09:47:57 pm » |
So the assignment was: "Multiple a matrix on an Arduino. If necessary wait until the last minute and post in the forums"?
Oh, you missed a part of the assignment. It also said, "Be really snotty about it when the forum slaves don't send your assignment back completed immediately."
|
|
|
|
|
Logged
|
|
|
|
|
Austin, TX
Offline
Faraday Member
Karma: 41
Posts: 5172
CMiYC
|
 |
« Reply #12 on: May 19, 2012, 09:49:25 pm » |
Oh, you missed a part of the assignment. It also said, "Be really snotty about it when the forum slaves don't send your assignment back completed immediately." That must have been in the extra credit portion of the assignment description.
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 90
Posts: 9401
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #13 on: May 20, 2012, 03:16:30 am » |
OK serious questions:
Can you post the code you have sofar? What did you expect? What did you get? What have you tried sofar?
What is the size of the square matrices? 5x5 4x4 3x3 2x2 1x1 ?
What Arduino are you using as there are square matrices that won't fit in an UNO, you might need a MEGA for them.
Should the code include matrix X vector?
Should the code include multiplication of different size square matrices?
Should the matrix multiplication algorithm include specific optimizations or algorithms like Gauss-Jordan elimination with partial pivoting?
The members of the matrices, are these char, byte, int, long, float ? (un)signed?
Should the code include error handling? - in the serial communication part (non digit input, missing bytes, checksum errors etc) - In the math part (overflow, underflow, divide by zero)
What are allowed baudrates for your application?
Are you familiar with the playground and tutorial sections of the Arduino where many example code snippets live?
Can you give an example of typical matrices?
In short, can you explain more about the assignment as it is not unambiguous to me yet
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Tesla Member
Karma: 89
Posts: 6388
-
|
 |
« Reply #14 on: May 20, 2012, 02:05:06 pm » |
unfortunatley , it's an assignment in college , and i dodn't understand what they want definitely
I'm not sure what you mean by that, but if you don't understand your assignment you should get clarification from the person who set it.
|
|
|
|
|
Logged
|
|
|
|
|
|