help-octave
[Top][All Lists]
Advanced

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

Re: conj error


From: David Bateman
Subject: Re: conj error
Date: Wed, 11 May 2005 10:23:37 +0200
User-agent: Mozilla Thunderbird 0.8 (X11/20040923)

Eric Mesa wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

When trying to use conj I keep getting the error:

wrong type argument "complex_sparse"

Does anyone know a workaround?  I know this works in Matlab as is.

Thanks!


What version of octave are you using? The sparse mapper functions were included in the patch

2005-04-14  David Bateman  <address@hidden>

       * ov-mapper.cc (any_element_less_than, any_element_greater_than):
       New versions for SparseMatrix
       (SPARSE_MAPPER_LOOP_2, SPARSE_MAPPER_LOOP_1, SPARSE_MAPPER_LOOP):
       New macros.
       (octave_mapper::apply): Add special cases for sparse arguments to
       the mapper functions

So as 2.9.2 was released on 22 April, this change is in it... For the conj function under 2.9.2 I get

octave:1> a = speye(4,4); b = a*1i;
octave:2> conj(a), conj(b)
ans =

Compressed Column Sparse (rows=4, cols=4, nnz=4)
 (1 , 1) -> 1
 (2 , 2) -> 1
 (3 , 3) -> 1
 (4 , 4) -> 1

ans =

Compressed Column Sparse (rows=4, cols=4, nnz=4)
 (1 , 1) -> 0 - 1i
 (2 , 2) -> 0 - 1i
 (3 , 3) -> 0 - 1i
 (4 , 4) -> 0 - 1i

while using sparse and complex sparse matrices... Please try 2.9.2 or the CVS...

Ok, I see that you are in fact using the octave-forge sparse functions as the type "complex_sparse" is the name of the type in octave-forge. In that case "conj" is not defined for this type.... Again use 2.9.2 and disable the use of the sparse type in octave-forge by including the a file NOINSTALL in main/sparse of octave-forge before building octave-forge...

Regards
David

--
David Bateman                                address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary



-------------------------------------------------------------
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]