title: Conversion from string to double
body: <p>in this app for the calculation of the determinant, I'm using a java parser formel: <a href="http://www.speqmath.com/tutorials/expression_parser_java/index.html" rel="nofollow">http://www.speqmath.com/tutorials/expression_parser_java/index.html</a> in order to allow the user to enter in  input also  mathematical expressions. But the app crashes</p>
  
  <pre><code>secondo = new Button (this);
  secondo.setText("Fill the matrix and CALCULATE");
  tableLayout.addView(secondo);
  secondo.setOnClickListener(new OnClickListener(){
  public void onClick(View arg0) {
  
  for (int i = 0; i &lt; 3; i++){
  for (int j = 0; j &lt; 3; j++){
  
  expr[i][j] = valore[i][j].getText().toString();  
  matrix[i][j] = prs.parse(expr[i][j]);
  
  }
  }
  
  for (int i = 0; i &lt; 3; i++){
  for (int j = 0; j &lt; 3; j++){
  
  int index1 = matrix[i][j].indexOf("=");
  
  matrix1[i][j] = matrix[i][j].substring(index1+2);
  
  }
  }
  for(int i = 0; i &lt; 3; i++){
  for(int j = 0; j &lt; 3;  j++){
  
  vettore1[i][j] = Double.parseDouble(matrix1[i][j]);
  }
  }
  
  Matrix A = new Matrix(vettore1);
  det = A.det();
  </code></pre>
  
  <p>This code gives me this error:</p>
  
  <pre><code>06-07 17:59:09.138: E/AndroidRuntime(2420): FATAL EXCEPTION: main
  06-07 17:59:09.138: E/AndroidRuntime(2420): java.lang.NumberFormatException: 
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at org.apache.harmony.luni.util.FloatingPointParser.parseDblImpl(Native Method)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at org.apache.harmony.luni.util.FloatingPointParser.parseDouble(FloatingPointParser.java:283)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at java.lang.Double.parseDouble(Double.java:287)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at java.lang.Double.valueOf(Double.java:326)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at it.bisemanuDEV.matrixDET.SecondaAttivita$1.onClick(SecondaAttivita.java:143)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at android.view.View.performClick(View.java:2408)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at android.view.View$PerformClick.run(View.java:8819)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at android.os.Handler.handleCallback(Handler.java:603)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at android.os.Handler.dispatchMessage(Handler.java:92)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at android.os.Looper.loop(Looper.java:123)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at android.app.ActivityThread.main(ActivityThread.java:4627)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at java.lang.reflect.Method.invokeNative(Native Method)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at java.lang.reflect.Method.invoke(Method.java:521)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  06-07 17:59:09.138: E/AndroidRuntime(2420):     at dalvik.system.NativeStart.main(Native Method)
  </code></pre>