help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] Wrong result in vector from gsl_vector_alloc_col_from_matrix


From: Stephan Petzchen
Subject: [Help-gsl] Wrong result in vector from gsl_vector_alloc_col_from_matrix
Date: Tue, 13 Nov 2012 18:41:16 +0100

Hi,

I am working on the 1.15 version of GSL and get a wrong result in vector v
from gsl_vector_alloc_col_from_matrix.  (matrix/gsl_vector_double.h,
matrix/getset_source.c)

My understanding is that it should return the matrix column data for a
specified column. So, with gsl_vector_alloc_row_from_matrix, here the
specified row will be returned.

Example:

Matrix:
1 1 1 1 1 1 1
2 2 2 2 2 2 2
3 3 3 3 3 3 3
4 4 4 4 4 4 4

Expected result for column offset 4 with vector size 4 (specified by no. of
matrix rows): 1 2 3 4
x x x x 1 x x
x x x x 2 x x
x x x x 3 x x
x x x x 4 x x

Actual result:
x x x x 1 1 1
2 x x x x x x
x x x x x x x
x x x x x x x


I am not sure but it should work similar to int *gsl_matrix_get_col*
*(gsl_vector
* v, const gsl_matrix * m, size_t j), at least the result should be the
same. At least this is my understanding actually.*
*
*
*Maybe someone can help me when I am wrong in my understanding and the
actual behavior is the way it should work and data is only given from the
matrix column offset on with matrix no. of rows as vector size. But this
makes for me less sense why this vector size is than chosen.*
*
*
*Thanks for you help.*
*
*
*STephan*


reply via email to

[Prev in Thread] Current Thread [Next in Thread]