From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11701 invoked by alias); 7 Nov 2002 17:15:52 -0000 Mailing-List: contact gsl-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sources.redhat.com Received: (qmail 11681 invoked from network); 7 Nov 2002 17:15:47 -0000 Received: from unknown (HELO chinook.phys.nwu.edu) (129.105.206.190) by sources.redhat.com with SMTP; 7 Nov 2002 17:15:47 -0000 Received: (from ato@localhost) by chinook.phys.nwu.edu (8.11.6/8.11.6) id gA7HDJY28499 for gsl-discuss@sources.redhat.com; Thu, 7 Nov 2002 11:13:19 -0600 Date: Thu, 07 Nov 2002 09:22:00 -0000 From: Atakan Gurkan To: gsl-discuss@sources.redhat.com Subject: Re: GSL-1.2 gsl_eigen_symmv() Problem Message-ID: <20021107111319.A28496@chinook.phys.nwu.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from amj26@hermes.cam.ac.uk on Thu, Nov 07, 2002 at 05:06:04PM +0000 X-SW-Source: 2002-q4/txt/msg00122.txt.bz2 On Thu, Nov 07, 2002 at 05:06:04PM +0000, Adam Johansen wrote: > #include > > #include > #include > #include > > int main(int argc, char** argv) { > double hmmm; > gsl_eigen_symmv_workspace* wsp; > gsl_matrix* in, *out; > gsl_vector* vec; > > in = gsl_matrix_alloc(2,2); > out = gsl_matrix_alloc(2,2); > vec = gsl_vector_alloc(2); > int i; > > int mi = 0; > > for(i = 1; i < 101; i++) { > hmmm = log(1.2); > > for(mi = 0; mi < 6; mi++) { > wsp = gsl_eigen_symmv_alloc(2); > > gsl_matrix_set(in, 0, 0, i); > gsl_matrix_set(in, 0, 1, i - 1); > gsl_matrix_set(in, 1, 0, i - 1); > gsl_matrix_set(in, 1, 1, i - 0.5); > > printf("Solving matrix %i in iteration %i...\n", mi, i); > gsl_eigen_symmv(in, vec, out, wsp); > > gsl_eigen_symmv_free(wsp); > } > } > } himm, shouldn't you include math.h? since log does not return int this might cause a problem. BTW, your code doesn't compile with a C compiler, you might want to move those int statements a few lines earlier. ato