help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Please run these programm. I dont know where the mistake


From: Thomas Weber
Subject: Re: [Help-gsl] Please run these programm. I dont know where the mistake is.
Date: Tue, 19 Dec 2006 12:11:32 +0100

Hi, 

Am Montag, den 18.12.2006, 22:28 +0100 schrieb address@hidden:
> Please run these programm. I dont know where the mistake is.

Run it under DDD and look at the entries of aa_data[] .


> double aa_data[] = {   -5.,  1., 3.,   2.,
>                                    6.,  0., -2.,  0.,
>                                   -2., 3.,  1.,  -2.,
>                                    4., 5.,   4.,   3.  } ;
> gsl_matrix_view AA = gsl_matrix_view_array (aa_data, N, N);

AA is a view; changes to the elements of AA will change the entries of
the underlying aa_data[]!

So, your aa_data[] changes during your program. The attached version of
your program uses four different arrays to circumvent this (which
obviously is not the way to do it in a real world application).

        Thomas


Attachment: chk_real1.c
Description: Text Data


reply via email to

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