// Instructions: // (1) First compile and execute to see data points. // (2) Un-comment the section below and add your code for // the least-squares matrix and matrix-vector products. // Compile and execute to the see the plane. import edu.gwu.lintool.*; import org.edisonwj.draw3d.*; import javafx.application.*; import javafx.scene.*; import javafx.scene.paint.*; import javafx.stage.*; import java.util.*; public class RegressionExample3D extends Application { String title = "3-variable regression example"; void drawingCommands () { int n = 9; double[] x = {1.1, 1.5, 2.2, 2, 3.1, 3.2, 2.9, 1.1, 2}; double[] y = {0.9, 1.9, 1.2, 2.2, 1, 2.1, 3.2, 2.8, 3}; double[] z = {-0.1, 0.6, 0.63, 1.2, 0.85, 1.8, 2.1, 1.1, 1.4}; // Display the points d3.setDrawColor (Color.RED); for (int i=0; i