Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    25
    Views
    4,957

    Re: java help with inversing matrices

    Why? That shows the problem with the posted code. The code must not be following the algorithm. The code as posted will not work.
    What will the value of j be when the for loop ends?
  2. Replies
    25
    Views
    4,957

    Re: java help with inversing matrices

    Look at the algorithm and see if the code is following it.

    If you removed the isolated definitions for i,j,k how does the code compile without an error?
  3. Replies
    25
    Views
    4,957

    Re: java help with inversing matrices

    Remove the isolated, separate definitions for i,j,k

    Define them in the for loops:

    for(int i = 0; ....)
    same for j and k

    Look at how row and col were defined at the top of the method.
  4. Replies
    25
    Views
    4,957

    Re: java help with inversing matrices

    What happens now?
    I see that i,j,k are still defined outside the for loops. Why is that?
  5. Replies
    25
    Views
    4,957

    Re: java help with inversing matrices

    That's a runtime exception, not a compiler error.
    At line 2387 the index to an array went past the end of the array.
    Remember that the range of indexes for an array is from 0 to the array...
  6. Replies
    25
    Views
    4,957

    Re: java help with inversing matrices

    Please copy the full text of the error messages and paste it here.

    Please edit your post and wrap your code with


    <YOUR CODE HERE>

    to get highlighting and preserve formatting.
  7. Replies
    25
    Views
    4,957

    Re: java help with inversing matrices

    You need to find the algorithm to be able to write the code.
  8. Replies
    25
    Views
    4,957

    Re: java help with inversing matrices

    Without an algorithm for how to invert a matrix, you can not write a program to do it.
  9. Replies
    25
    Views
    4,957

    Re: java help with inversing matrices

    How will you know if the matrix has been correctly inverted if you can not describe what an inverted matrix is?
  10. Replies
    25
    Views
    4,957

    Re: java help with inversing matrices

    What is the algorithm for inverting a matrix? Can you post the details of what is done and give an example of a matrix before and after?
Results 1 to 10 of 10