Package com.CompPad.model

Examples of com.CompPad.model.Matrix


            // strings that will be used to set x and y labels
            String xUnitString;
            String yUnitString;
            com.CompPad.model.EvalUnit xEvalUnit = null;
            com.CompPad.model.EvalUnit yEvalUnit = null;
            Matrix mmatrix = (Matrix) plot.getObject();
            int m = (int) Math.round(mmatrix.getNumberOfRows().getReal(Unit.ONE));
            int n = (int) Math.round(mmatrix.getNumberOfColumns().getReal(Unit.ONE)) / 2;
            String[] colDescriptions = new String[n+1];
            colDescriptions[0] = "x";
            List<Double[]> x = new ArrayList(); /* List of x/y pairs */
            Double newRow[];
            int mm = 0; /* Total number of rows after loop */
            // iterate columns
            for (int j=0; j<n; ++j){
                /* Create column label sequence */
                colDescriptions[j+1] = "series "+(j+1);
                // iterate rows
                for (int i=0; i<m;++i){
                    if (mmatrix.get(i,2*j)==null){
                        /* Set "no data" value */
                    }
                    else {
                        newRow = new Double[n+1];
//                        Arrays.fill(newRow,Double.MIN_NORMAL);
                        Arrays.fill(newRow,Math.pow(2.0, -1022.0));
                        // x value
                        ComplexAmount a1 = (ComplexAmount)mmatrix.get(i,2*j);
                        // y value
                        ComplexAmount a2 = (ComplexAmount)mmatrix.get(i,2*j+1);
                        // Check whether units have been defined
                        if (xunits==null){
                            // if not then define x and y units
                            xunits = a1.getUnit();
                            yunits = a2.getUnit();
View Full Code Here

TOP

Related Classes of com.CompPad.model.Matrix

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.