Re: default empty values in Result Table
Posted by Sylvia Neumann on Jun 24, 2016; 5:19am
URL: http://imagej.273.s1.nabble.com/default-empty-values-in-Result-Table-tp5012931p5016719.html
Hi Wayne,
I was trying your macro below, but it doesn't recognize the command "new ResultsTable" and probably also not the setNaNEmptyCells(true). I tried different spelling versions, but cannot get it to work. I can use the pre-fill option, but it would be really helpful to just set the empty values to NaN or if possible just leave the values empty. I want to use this to make a custom Results Table in a macro, not using the Analyze menu.
rt = new ResultsTable();
rt.setNaNEmptyCells(true);
row = 0;
for (n=0; n<=2*Math.PI; n += 0.1) {
rt.setValue("n", row, n);
if (row>2)
rt.setValue("Sine(n)", row, Math.sin(n));
if (row<3||row>6)
rt.setValue("Cos(n)", row, Math.cos(n));
row++;
}
rt.showRowNumbers(false);
rt.show("Table with Empty Cells");
Is there a way to get this work?
Thanks, Sylvia