Click here to Skip to main content
15,881,863 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to know where I came on say double [][] B= Matrix.solve(double[][], double[][])

When I run my program from the command prompt, there is no hassles but when I use this in the Eclipse IDE it will not accept it

Can someone please help??? many thanks!! Just self educating in program java and trying to write an analysis program

What I have tried:

Looking at web searches and tried to write alternative code. But must have answer in array format or be able to convert the Matrix to an array
Posted
Updated 26-Jul-20 23:39pm
Comments
Richard MacCutchan 27-Jul-20 5:37am    
Help with what? We have no idea what you are doing or what your problem is. Please use the Improve question link above, and add some proper detail.
Garth J Lancaster 27-Jul-20 5:48am    
well, we can't see your screen and figure out 'from where' you got matrix.solve or such - as Sandeep's solution (1) guesses, it could be the JAMA library.

The answer to the first part of your question could be 'you need to look at your import statements, or the Maven or Gradle build files' .. the answer to why is doesn't work in Eclipse is likely that the required library isnt imported or available, so maybe identifying which Java matrix library and how it's being used will give you the clue for the Eclipse issue

1 solution

Example usage:
Java
Matrix A = Matrix.random(5, 5);
Matrix b = Matrix.random(5,1);

System.out.println("Matrix X - Testing the solve method (X = A^-1 * b)");
double X = Math.pow(A,-1) * b;
Matrix L= Matrix.solve(X);

Also, look at other various eaxmple of Matrix.solve here: https://www.codota.com/code/java/methods/Jama.Matrix/solve[^]. It has online editor too to play around.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900