MATLAB BUILDER JA 2 Guida Utente Pagina 249

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 292
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 248
Matrix Math Example
getfactor. ja va
/* getfactor.java
* This file is used as an example for the MATLAB
* Builder for Java product.
*
* Copyright 2001-2006 The MathWorks, Inc.
*/
/* Necessary package imports */
import com.mathworks.toolbox.javabuilder.*;
import factormatrix.*;
/*
* getfactor class computes cholesky, LU, and QR
* factorizations of a finite difference matrix
* of order N. The value of N is passed on the
* command line. If a second command line arg
* is passed with the value of "sparse", then
* a sparse matrix is used.
*/
class getfactor
{
public static void main(String[] args)
{
MWNumericArray a = null; /* Stores matrix to factor */
Object[] result = null; /* Stores the result */
factor theFactor = null; /* Stores factor class instance */
try
{
/* If no input, exit */
if (args.length == 0)
{
System.out.println("Error: must input a positive integer");
return;
}
/* Convert input value */
int n = Integer.valueOf(args[0]).intValue();
5-19
Vedere la pagina 248
1 2 ... 244 245 246 247 248 249 250 251 252 253 254 ... 291 292

Commenti su questo manuale

Nessun commento