Here you can find the source of saveProcessedDataFile(double[][] data, String file)
Parameter | Description |
---|---|
data | the processed data - an array of (angle, count, error) arrays |
file | the file in which to save the data |
public static void saveProcessedDataFile(double[][] data, String file) throws IOException
//package com.java2s; /*-// w w w.j ava 2s.co m * Copyright ? 2009 Diamond Light Source Ltd. * * This file is part of GDA. * * GDA is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License version 3 as published by the Free * Software Foundation. * * GDA is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along * with GDA. If not, see <http://www.gnu.org/licenses/>. */ import java.io.IOException; import java.io.PrintWriter; public class Main { /** * Saves the given processed data to the specified file. * * @param data * the processed data - an array of (angle, count, error) arrays * @param file * the file in which to save the data */ public static void saveProcessedDataFile(double[][] data, String file) throws IOException { PrintWriter pw = new PrintWriter(file); for (double[] point : data) { pw.printf("%f %f %f%n", point[0], point[1], point[2]); } pw.close(); } }