Spreadsheet standardDeviation fix.
parent
dd9ff48a4e
commit
6e59545dc1
|
@ -293,13 +293,13 @@ public class Spreadsheet {
|
|||
|
||||
double avg = 0;
|
||||
int counter = 0;
|
||||
for(int r = getRow(startCellName); r<getRow(endCellName); r++)
|
||||
for(int c = getCol(startCellName); c<getCol(endCellName); c++)
|
||||
if(!(cells[r][c].isEmpty())) {
|
||||
for(int r = getRow(startCellName); r<getRow(endCellName)+1; r++)
|
||||
for(int c = getCol(startCellName); c<getCol(endCellName)+1; c++)
|
||||
try {
|
||||
avg += Double.parseDouble(cells[r][c].getValue());
|
||||
counter++;
|
||||
cellNames.add(getCellName(r, c));
|
||||
}
|
||||
} catch (NumberFormatException | ArrayIndexOutOfBoundsException a ){}
|
||||
avg /= counter;
|
||||
//average/ add cell names to list
|
||||
System.out.println(cellNames);
|
||||
|
|
Loading…
Reference in New Issue