simple question on passing matrix arguments to functions
John Boik
john.boik@ompress.com
Fri Jul 4 02:57:00 GMT 2003
Hello. I have another simple question for the group. There are no examples
in the gsl manual (that I could find) of passing a matrix or vector to a
function. If you create a matrix, say M, in main(), how do you pass it on
to newfunction()? I assume you pass the pointer as *M, but that does not
seem to work for me. In the new function, calls to gsl_matrix_get(M,i,j)
give me an error on compilation. Do you need to use a gsl_matrix_view_array
command to remake the matrix in newfunction()?
Thanks,
John
More information about the Gsl-discuss
mailing list