help-octave
[Top][All Lists]
Advanced

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

Re: duplicate binary operator


From: David Bateman
Subject: Re: duplicate binary operator
Date: Tue, 03 Oct 2006 11:51:53 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

the_verge wrote:
> I have been using the symbolic solver function symsolve(), and have been
> getting multiple warnings as follows:
>
> warning: duplicate binary operator `+' for types `symbolic matrix' and
> `symbolic matrix'
>
> or something similar.  The warning seems to occur for every single operator
> in my symbolic equation.  for instance, here's some code that gets me the
> warnings:
>
> symbols
> V_x=sym('V_max');
> f= ((V_x*I_sc*(C_1/(C_2*V_oc)))*e^(V_x/(C_2*V_oc))-1) - I_sc *
> (1-C_1*(e^(V_x/(C_2*V_oc))-1));
> V_max = symfsolve({f},{V_x == 1})
>
>
> where all variables are defined constants except for V_x and f.  (I don't
> think the values of the constants are important to this question, but if you
> want them, I can post them).
>
> Is there something wrong with the way I'm using the symbolic solver in
> Octave?
>
> Thanks.
>   

No this is a bug in the symbolic toolbox itself. When it was written
this message didn't exist. John added to help in the debugging of new
types. It means that the binary operator + is defined twice of the
symbolic matrix type and so you might not be getting the version you
wanted. This is the INSTALL_BINOP macro with the op_add operator, which
are defined in octave-forge in  the symbolic header file sym-ops.h

However, this is weird as the INSTALL_BINOP is called identically for
the op_add and op_sub operators and so you should see the error for both
operators at least.

Could you see a complete example, including variable definitions and
I'll try and see if I can trace this. Once the place where the operator
is installed twice is found the patch will be very simple..

D.


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

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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