Remove unused variable
[pspp] / src / language / stats / factor.c
index 8a38082bfa101371385d6fc6e78b25b81a340c2f..9480b3a17a8ccc9947891e24a521c64d0e31c2d3 100644 (file)
@@ -1969,7 +1969,7 @@ show_factor_correlation (const struct cmd_factor * factor, const gsl_matrix *fcm
   for (i = 0 ; i < fcm->size1; ++i)
     {
       for (j = 0 ; j < fcm->size2; ++j)
-       tab_double (t, heading_columns + i,  heading_rows +j, 0,
+       tab_double (t, heading_columns + j,  heading_rows + i, 0,
                    gsl_matrix_get (fcm, i, j), NULL, RC_OTHER);
     }
 
@@ -2065,7 +2065,7 @@ show_correlation_matrix (const struct cmd_factor *factor, const struct idata *id
          for (i = 0; i < factor->n_vars; ++i)
            {
              for (j = 0; j < factor->n_vars; ++j)
-               tab_double (t, heading_columns + i,  y + j, 0, gsl_matrix_get (idata->mm.corr, i, j), NULL, RC_OTHER);
+               tab_double (t, heading_columns + j,  y + i, 0, gsl_matrix_get (idata->mm.corr, i, j), NULL, RC_OTHER);
            }
        }
 
@@ -2084,7 +2084,7 @@ show_correlation_matrix (const struct cmd_factor *factor, const struct idata *id
                  if (i == j)
                    continue;
 
-                 tab_double (t, heading_columns + i,  y + j, 0, significance_of_correlation (rho, w), NULL, RC_PVALUE);
+                 tab_double (t, heading_columns + j,  y + i, 0, significance_of_correlation (rho, w), NULL, RC_PVALUE);
                }
            }
        }
@@ -2106,7 +2106,6 @@ show_covariance_matrix (const struct cmd_factor *factor, const struct idata *ida
   struct tab_table *t ;
   size_t i, j;
   int y_pos_corr = -1;
-  int y_pos_sig = -1;
   int suffix_rows = 0;
 
   const int heading_rows = 1;
@@ -2177,7 +2176,7 @@ show_covariance_matrix (const struct cmd_factor *factor, const struct idata *ida
          for (i = 0; i < factor->n_vars; ++i)
            {
              for (j = 0; j < factor->n_vars; ++j)
-               tab_double (t, heading_columns + i,  y + j, 0, gsl_matrix_get (idata->mm.cov, i, j), NULL, RC_OTHER);
+               tab_double (t, heading_columns + j,  y + i, 0, gsl_matrix_get (idata->mm.cov, i, j), NULL, RC_OTHER);
            }
        }
     }