help-octave
[Top][All Lists]
Advanced

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

C++ Question


From: Quentin H. Spencer
Subject: C++ Question
Date: Mon, 31 Mar 2003 11:58:50 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

Hello all,

I have been writing some functions in C that use the octave ComplexSVD class, and I'm having trouble understanding some strange behavior. Initially I wrote the function with the following syntax:
        
        ComplexSVD svd;
        svd = ComplexSVD( matrix , SVD::std);
        ComplexMatrix U = svd.left_singular_matrix();

Later I changed the syntax to the following (which mirrors the syntax used in svd.cc).

        ComplexSVD svd( matrix , SVD::std);
        ComplexMatrix U = svd.left_singular_matrix();

When using the first syntax, the function would usually return properly the first time, but subsequent runnings of my C++ function (and sometimes even octave's builtin svd function) often resulted in the following:

error: ComplexSVD: U not computed because type == SVD::sigma_only

This is usally followed by a segmentation fault. There could be some technicality about C++ that I don't understand here, but I don't see the different between these two implementations. Can anyone enlighten me?

Quentin Spencer



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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