Skip to content

Commit

Permalink
Finish matrix eigenvalue/eigenvector sample
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Jul 13, 2024
1 parent 0044a13 commit cf3168a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions samples/test_matrix_eigen.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@
gsl_eigen_symmv_free(W),
gslConst(gslGSL_EIGEN_SORT_ABS_ASC,Val),
gsl_eigen_symmv_sort(Eval,Evec,Val),
gsl_matrix_free(M),

between(0,3,I),
gsl_vector_get(Eval,I,Eval_i),
gsl_matrix_column(Evec,I,Evec_i),

format("[~d] eigenvalue = ~g, eigenvector = ", [I,Eval_i]),
'$struct_to_pointer'(Evec_i,V),
format("[~d] eigenvalue = ~g, eigenvector = ", [I,Eval_i]),
vec_to_list(V,L),
gsl_vector_free(V),
write(L), nl,

fail;
gsl_vector_free(Eval),
gsl_matrix_free(Evec),
gsl_matrix_free(M).
gsl_matrix_free(Evec).

0 comments on commit cf3168a

Please sign in to comment.