// This macro demonstrates the Array.deleteValue() // and Array.deleteIndex() macro functions added // in ImageJ 1.52o. // delete a numeric value a1 = Array.getSequence(7); Without3 = Array.deleteValue(a1, 3); // delete a string value a2= newArray("one", "two", "three", "four"); WithoutTwo = Array.deleteValue(a2, "two"); // delete using an index a3 = Array.getSequence(5); Array.reverse(a3); WithoutIndex1 = Array.deleteIndex(a3, 1); Array.show(a1, Without3, a2, WithoutTwo, a3, WithoutIndex1);