Like Tree3Likes
  • 1 Post By iMalc
  • 1 Post By stahta01
  • 1 Post By AndiPersti

Matrix math logic with array! Need Fast Help!

This is a discussion on Matrix math logic with array! Need Fast Help! within the C Programming forums, part of the General Programming Boards category; how to make matrix 2x2 with array? i had exam today and its about 30 minutes from now please tell ...

  1. #1
    Registered User loserone+_+'s Avatar
    Join Date
    Dec 2012
    Location
    Indonesia
    Posts
    112

    Matrix math logic with array! Need Fast Help!

    how to make matrix 2x2 with array?
    i had exam today and its about 30 minutes from now
    please tell me fast, just logic what i need ...

  2. #2
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,302
    Tell us what you think the answer is and we might confirm whether you are correct or not.
    stahta01 likes this.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  3. #3
    Registered User loserone+_+'s Avatar
    Join Date
    Dec 2012
    Location
    Indonesia
    Posts
    112
    i dont have the code right now by the way
    i just need logic to make matrix with array thing
    matrix in math
    example
    matrix a[2],b[2];

  4. #4
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,673
    You don't need code to explain matrix math; just look up what you don't know in math before the test. :s

  5. #5
    Registered User loserone+_+'s Avatar
    Join Date
    Dec 2012
    Location
    Indonesia
    Posts
    112
    Quote Originally Posted by whiteflags View Post
    You don't need code to explain matrix math; just look up what you don't know in math before the test. :s
    really?
    its make matrix code is easy?
    what logic to make matrix a[2],b[2];
    and the result of the matrix
    please! only ten minutes i have until exam

  6. #6
    Registered User
    Join Date
    May 2009
    Posts
    2,553
    Is his/her question very vague and unclear?
    I really could not answer the question because the question was contradictory. No idea if it is a programming or math question.
    No idea what matrix operations where being discussed.

    I just wondered if I was missing something, or do the rest of you think the question was too vague.

    Tim S.
    iMalc likes this.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

  7. #7
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,673
    It doesn't matter. Based on past experience and how the rules are applied we can't help people pass exams anyway.

  8. #8
    Registered User loserone+_+'s Avatar
    Join Date
    Dec 2012
    Location
    Indonesia
    Posts
    112
    so it just depend on me anyway,
    actually i still had time to studying, the exam started at13.00 in my country

    do u know this code use for what
    setw
    and #include<iomanip.h>
    tell me about that
    i find it on my friend is computer, that is one of matrix he making

  9. #9
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    Why not ask your friend?

  10. #10
    Registered User
    Join Date
    May 2012
    Posts
    1,066
    Quote Originally Posted by loserone+_+ View Post
    do u know this code use for what
    setw
    and #include<iomanip.h>
    That's C++.

    Bye, Andreas
    stahta01 likes this.

  11. #11
    Stoned Witch Barney McGrew's Avatar
    Join Date
    Oct 2012
    Location
    astaylea
    Posts
    420
    Quote Originally Posted by loserone+_+ View Post
    do u know this code use for what
    setw
    and #include<iomanip.h>
    tell me about that
    It's gibberish.

    Quote Originally Posted by loserone+_+ View Post
    i find it on my friend is computer, that is one of matrix he making
    • Why was the computer on your friend?
    • Why do you describe his computer as a matrix that he's making?

  12. #12
    Registered User
    Join Date
    Jan 2013
    Location
    127.0.0.1
    Posts
    3
    the question is too vague, maybe the reason is he/she might not be able to express the problem in a proper way...
    you can create a 2x2 matrix like this...
    Code:
    int M[2][2] = {7,10,4,11};
    What logic do you need???
    What operations would you like to perform on the said matrix???

  13. #13
    Registered User
    Join Date
    Jun 2005
    Posts
    6,266
    Quote Originally Posted by QuantumNut View Post
    the question is too vague, maybe the reason is he/she might not be able to express the problem in a proper way...
    you can create a 2x2 matrix like this...
    Code:
    int M[2][2] = {7,10,4,11};
    You might find
    Code:
    int M[2][2] = {{7,10},{4,11}};
    works better.
    Right 98% of the time, and don't care about the other 3%.

  14. #14
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,658
    Quote Originally Posted by grumpy
    You might find
    Code:
    int M[2][2] = {{7,10},{4,11}};
    works better.
    They should both work the same, unless there is a bug in the compiler, except that being more explicit tends to make it easier to understand and less likely that a compiler might warn about a potential bug.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  15. #15
    Registered User loserone+_+'s Avatar
    Join Date
    Dec 2012
    Location
    Indonesia
    Posts
    112
    Quote Originally Posted by cyberfish View Post
    Why not ask your friend?
    Because he get the c code from others, he didnt understand that
    Quote Originally Posted by AndiPersti View Post
    That's C++.
    i see, its c++ thing, so its my mistake
    Quote Originally Posted by Barney McGrew View Post
    It's gibberish.
    lol, i dont know it gibberish or not
    • Why was the computer on your friend?
    • Why do you describe his computer as a matrix that he's making?
    lol, what do u mean computer in your question? if u ask OS, its windows 7
    lol i didnt describe his computer, i describe the code he was making, and i wonder #include<iomanip.h> and setw()i s for what?
    Quote Originally Posted by QuantumNut View Post
    Code:
    int M[2][2] = {7,10,4,11};
    What logic do you need???
    What operations would you like to perform on the said matrix???
    Ah i confused to tell what is i need, and it is over yesterday,
    Quote Originally Posted by grumpy View Post
    You might find
    Code:
    int M[2][2] = {{7,10},{4,11}};
    works better.
    lol i see that, and to printing variables just using printf right

    The exam was over and i cant answer the question but its not a big problem

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Matrix - Logic error?
    By FernandoBasso in forum C Programming
    Replies: 2
    Last Post: 11-23-2011, 10:50 AM
  2. Pointers - Fast for Math Functions?
    By MPQC in forum C++ Programming
    Replies: 5
    Last Post: 11-10-2009, 02:00 PM
  3. What is better, math or logic?
    By thetinman in forum C++ Programming
    Replies: 3
    Last Post: 02-25-2006, 12:12 PM
  4. Riddles/Math/Logic
    By Driveway in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 09-03-2002, 10:26 AM
  5. Library for matrix math/ linear algebra?
    By The V. in forum C++ Programming
    Replies: 0
    Last Post: 09-25-2001, 10:36 PM

Tags for this Thread


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